Skip to content

Releases: MyTooliT/ICOc

Version 2.0.0

17 Sep 14:40
da89dd9
Compare
Choose a tag to compare

General

  • Remove support for Python 3.9

API

  • Removed dependency to pint library. All measurement code now returns numbers instead of objects of the pint class Quantity again.

Measurement

  • The method convert_raw_to_g now returns a float instead of a Quantity.

Network

  • Removed the coroutines:

    • read_streaming_data_seconds and
    • read_streaming_data_amount

    Please just use open_data_stream and async for, if you want to replace code that used these coroutines.

  • Added the coroutine shutdown again: You can use this method, if you want to shutdown the bus manually

Storage

  • The storage class now only acts as an context manager for the class that modifies the data itself (StorageData). You now need to provide the format of the axis data when you first open the storage class instead of later in the process, when you add data. Overall the process of storing acceleration data as HDF5 file should be simpler and less error prone due to the new design.
  • You can now also use the class to work with already existing HDF5 files.

Streaming

  • We changed the interface (data structure) for accessing streaming data to improve the performance when working with the high frequency data of the ICOtronic system.

  • Add the amount of lost messages to the data returned by the iterator over the streaming data

  • Raise an exception if the amount of buffered streaming messages exceeds a certain value (currently one second worth of streaming data).

    Note: A large buffer indicates that the application is not able to keep up
    with the current rate of retrieved messages and therefore the probability of
    losing messages is quite high.

  • Removed the class TimestampedValue

Version 1.12.0

11 Sep 11:02
0313c03
Compare
Choose a tag to compare

Documentation

Scripts

ICOc

  • Handle encoding in error messages (Issue #58)

ICOn

Rename

  • Handle timeouts properly (Issue #59)

Internal

Streaming

  • Fix out of bound access error for “Stop Stream” messages

Version 1.11.0

01 Jul 09:23
1390226
Compare
Choose a tag to compare

Scripts

ICOc

  • Handle empty channel configuration e.g. something like

    icoc -1 0 -2 0 -3 0 -n Test-STH
  • Handle empty channel configuration in UI

ICOn

  • Handle empty channel configuration e.g. something like

    icon measure -1 0 -2 0 -3 0 -n Test-STH

Internal

CAN

Streaming

  • Ignore streaming messages without any data bytes

1.10.0

29 Apr 08:34
f562a52
Compare
Choose a tag to compare

Documentation

ICOn

Measure

  • Add support for specifying the channel configuration for the measurement

Internal

Network

  • The Network class now raises a CANInitError (a subclass of NetworkError), when it is unable to initialize the CAN connection instead of a more general NetworkError.
  • Make sure CAN bus is shutdown properly in error scenarios. This update should get rid of warning messages, such as “PcanBus was not properly shut down”.

Sensor Configuration

  • Add check for correct init arguments
  • Add method to check if sensor configuration requires hardware that supports channel configuration

STU- Test

  • The STU test now tries to fix CAN communication problems, after flashing a new firmware on the chip. This fix should get rid of the bus error that might occur otherwise:

    Bus error: an error counter reached the 'heavy'/'warning' limit
    

    and might cause problems in in other tests afterwards.

1.9.0

30 Jan 10:11
5018ee4
Compare
Choose a tag to compare

ICOn

  • Moved code into scripts directory
  • ICOn now handles timeout problems while streaming data (#50)

Linting

  • We now check the whole codebase with Pylint

Internal

Network

  • The network class now handles timeout problems when streaming data. If no streaming data arrives for a specified amount of time, then a StreamingTimeoutError will be raised.

Version 1.8.0

19 Dec 15:43
f140380
Compare
Choose a tag to compare

Documentation

Docker

  • Removed (references to) Docker Hub images, since nobody used them anyway
  • Removed Dockerfile for Alpine Linux
  • Use virtual environment for ICOc install in Dockerfile for Ubuntu

ICOn

Measurement

  • Add timestamp to measurement filename (Issue #48)
  • Use default value for acceleration sensor range (Issue #47)
  • Add options for ADC configuration values:
    • prescaler,
    • acquisition time,
    • oversampling rate, and
    • reference voltage
  • Use 0 as value for infinite runtime (option -t/--time) (Issue #49)

Linting

  • We now check the codebase – currently only for errors – with Pylint

Logging

  • Log files are now stored in the user log directory (of the current OS) instead of the current working directory

Internal

Package

  • Merged Python modules for sensor code

    • mytoolit.can.sensor
    • mytoolit.measurement.sensor

    into mytoolit.measurement.sensor

  • Moved EEPROMStatus definition from mytoolit.eeprom.eeprom_status into mytoolit.eeprom.status

Storage

  • Add method dataloss to determine amount of measurement data loss

Version 1.7.0

27 Jun 11:52
a8af82e
Compare
Choose a tag to compare

Configuration

Package

  • Require Python 3.9 or later

  • Uploaded package to PyPi, which means you can now install ICOc via:

    pip install icoc

Scripts

  • We removed the clean-repo command

Hardware Tests

  • The SMH, STH and STU tests now store the PDF test report in the current working directory

ICOc

  • The command now stores log files inside the current working directory

ICOn

Config

Measurement

  • Add the possibility to change the measurement duration (option -t, --time)
  • Store data in HDF5 format

STU

  • Add reset command

Style

  • We now use Black instead of YAPF to format the code base, since Black:
    • supports the latest Python features (e.g. match/case and except*) and
    • splits long strings (experimental feature).

Tests

  • We added two (very basic) Prysk tests for the command line tool icon

Internal

ADC

  • We added methods to read the

    • prescaler,
    • acquisition time,
    • oversampling rate and
    • the sample rate

    of ADC configuration objects (class ADCConfiguration).

Network

  • Collected streaming data now also contains the message counter value
  • Fixed reading data from multiple channels

Streaming Data

  • We added the method default, which can be used to serialize data (into JSON format)

Storage

  • We added the method add_streaming_data, which can be used to directly add StreamingData objects to the (HDF5) storage.

Version 1.6.0

14 Dec 12:52
4d82ad7
Compare
Choose a tag to compare

Docker

We now provide ICOc-Docker images based on

For more information, please take a look here.

ICOc

Internal

Measurement

  • Renamed convert_to_supply_voltage to convert_raw_to_supply_voltage
  • The conversion function convert_raw_to_g now returns the data value including the unit (Quantity)
  • The conversion function convert_raw_to_supply_voltage now returns the data value including the unit (Quantity)

Network

  • Removed the coroutine read_x_acceleration (please use read_streaming_data_single) instead

  • Added the coroutines

    Name Description
    read_streaming_data_seconds Read streaming data for certain amount of time
    read_streaming_data_amount Read certain amount of streaming values

ICOn

We now provide the command line tool icon in addition to icoc. This CLI tool currently only offers a very limited subset of the functionality of icoc. However, since ICOn is based on python-can, it offers two advantages over icoc:

Python

This version of ICOc requires Python 3.8 or later.

Setup

We modernized the setup process of the Python package and removed setup.py in favor of pyproject.toml.

WSL

We updated the documentation on how to use (parts of) ICOc on the latest stable version of Ubuntu (22.04) in the Windows subsystem for Linux

Version 1.5.0

22 Sep 12:53
4b12165
Compare
Choose a tag to compare

ICOc

Command Line

  • You can now set/enable the measurement for channel 2 and 3 just by providing the option for the measurement channel without an argument. In this case the measurement channel will be mapped to the corresponding hardware/sensor channel, i.e.

    • measurement channel 2 will use hardware channel 2 and
    • measurement channel 3 will use hardware channel 3.

    Example:

    icoc -2
    

    The command above will use

    • hardware channel 1 for measurement channel 1 (default value),
    • hardware channel 2 for measurement channel 2, and
    • disable measurement channel 3.
  • ICOc can now connect to an STH, which has “no name” using the command line option -n (--name):

    icoc -n '' # alternatively you can also just use `icoc -n`

Logging

  • The log level set in the command line interface is now correctly propagated to the CAN class.

STH Tests

  • The STH test script now uses the hardware version in the configuration (STHHARDWARE VERSION) to determine the correct chip for the flash process.

    Hardware Version Chip
    1.x.x BGM113A256V2
    2.x.x BGM123A256V2
  • The test that executes self test now only checks that the absolute difference between the voltage

    • at the the self test and
    • before/after the self test

    is larger than a certain value. Before we always assumed that the voltage at the test is higher than before/after. This does not seem to be the case for certain sensors like the ± 40 g sensor ADXL356.

  • The EEPROM test now also write the

Internal

Network

Version 1.4.0

10 Aug 13:43
369a554
Compare
Choose a tag to compare

ICOc

Channel Selection

  • ICOc now supports more sensor channels. You can now select one of up to 255 (instead of 8) hardware channels for each of the three measurement channels.
  • The CLI interface now uses three options (-1, -2, -3), instead of one option (-p), to specify the channel number of each of the three measurement channels.

Logging

We replaced our custom logging class in the ICOc command line interface with logging code from the Python standard library. This logging code stores data in the following files:

  • cli.log: Log messages of ICOc
  • network.log: Log messages of CAN network class
  • plotter.log: Log messages of plotter (window process)

By default ICOc only write log messages of level ERROR or higher into theses files. To print more detailed output you can use the option --log to change the log level. For example, to change the log level to DEBUG (or higher) you can use the the following command:

icoc --log debug

The other parts of the code, which use the old Network class (e.g. the verification test) do not store the log output in files, but instead use the standard error output (stdout). This change should hopefully improve the visibility of important log messages.

Tests

  • The production tests for the hardware (STH, SMH and STU) should now also work on macOS, after you installed the PCBUSB library.
  • The STH tests now use the correct ADC reference voltage for the ± 40 g acceleration sensor ADXL356.

Internal

Measurement

  • Renamed the method convert_voltage_adc_to_volts to convert_to_supply_voltage
  • The method convert_to_supply_voltage now supports different reference voltages

Network

  • The methods to

    • activate (activate_acceleration_self_test) and
    • deactivate (deactivate_acceleration_self_test)

    the self test of the accelerometer now have a parameter to specify the dimension (x, y or z) for the self test.

  • The method to read the acceleration voltage (read_acceleration_voltage) now supports two additional parameters to

    • specify the dimension (x, y or z) and
    • the ADC reference voltage.
  • The method to read the supply voltage (read_supply_voltage) now takes the current reference voltage into consideration

  • The new method read_sensor_configuration can be used to read the current sensor configuration (i.e. the mapping from hardware/sensor channel to measurement channel).