Releases: MyTooliT/ICOc
Version 1.3.0
ICOc
-
The program can now change the number of the measured sensor channels. Please note:
- This only works with the latest version of sensor hardware and firmware
- The channel config support is in the very early stages of development; For example, ICOc currently still assumes that all sensors read acceleration values
STH Test
- All code of the (STH test) should now use the new network class.
SMH Test
-
We added a flash upload test for the sensory milling head PCB. To only execute this part of the SMH test you can use the following command:
test-smh -k flash
Internal
ICOc
- The streaming code now uses CAN read events instead of polling.
Logging
- We do not log the CAN streaming messages (every CAN message after you chose “Start Data Acquisition” in ICOc) any more. The reason behind this change is that ICOc is currently not able to handle logging and writing the data into a HFD5 file at the same time on “slower” processors (such as Intel’s Core i5-5300 @ 2.3 GHz).
Network
-
We added methods to read and write the sleep and advertisement time values of a sensor device using
System
(Bluetooth) commands -
We renamed the following methods:
Old Name New Name connect_sth
connect_sensor_device
get_sths
get_sensor_devices
Version 1.2.0
ICOc
- ICOc now assumes that sensor ranges reported by an STH below 1 (i.e. ± 0.5 g) are incorrect. In this case ICOc will assume that the range is ± 100 g instead.
STH Test
- The acceleration sensor self test (
test_acceleration_self_test
) now uses the new CAN class.
SMH Test
-
We added a basic test for the new sensory milling hardware (SMH). To execute the test, please use the command
test-smh
Currently the test:
- checks if the STU is able to connect to the device,
- checks if the raw ADC sensor values are roughly equal to the expected values, and
- writes, reads and checks the EEPROM values of the SMH.
Internal
Calibration
- We added a class to create “Calibration Measurement” message data bytes
Message
-
The textual representation of the message class now includes an extended description for
Network
We added methods
- to activate and deactivate the self test of the accelerometer
- to measure the acceleration voltage
- to read the advertisement time and sleep time of the reduced energy mode (mode 1)
Version 1.1.0
ICOc
Command Line Interface
-
Removed unused options from the command line interface
-
All command line arguments should now be checked for validity before starting ICOc
-
You do not need to connect the PCAN interface to list the help message of the command line interface:
icoc -h
anymore
User Interface
-
ICOc should now use considerably less CPU power.
-
The window for a connected STH now also displays the sensor range of the acceleration sensor (in multiples of g₀)
-
We removed unused menu items from the user interface
-
The menu part of the interface now uses a border to distinguish itself from the rest of the interface:
┌──────────────────────────────┐ │ 1-9: Connect to STH │ │ │ │ f: Change Output File Name │ │ n: Change STH Name │ │ │ │ q: Quit ICOc │ └──────────────────────────────┘
-
ICOc now provides default values for nearly all configuration inputs
-
ICOc does not crash any more if your terminal window is too small to display the whole interface. The interface will look garbled if you resize the window to a size that does not fit the whole interface. However, it will look fine after you resize the window to a proper size afterwards, as long as you do not make the window “really small” (e.g. leave only two lines for ICOc).
Errors
- ICOc now prints the error messages at the top of the output. This should make it easier to check the reason of an error.
Output
- ICOc now stores acceleration data in HDF5 format. For more information please take a look at the documentation.
Plotter
- The plotter window now displays the acceleration values as multiples of g₀ (9.81 m/s²).
Removed Functionality
- We removed a lot of the unused, untested and unmaintained functionality of ICOc:
- XML configuration
- Code to write and read EEPROM data using Excel files
Verification Test
- We enabled most parts of the STH verification test again
- The STH and STU verification tests now use the STH name from the configuration file
config.yaml
(STH
→NAME
).
Version 1.0.14
Logger
-
ICOc now always extend the logging file name with the postfix
_error
, if there was a problem.For example, if you use the default name ICOc.txt, then the logging file will be named
ICOc_TIMESTAMP_error.txt
(e.g.ICOc_2021-08-25_10-23-04_error.txt
) instead ofICOc_TIMESTAMP.txt
(e.g.ICOc_2021-08-25_10-23-04.txt
)
if there were any problems. The behavior of ICOc was similar before. However, the name of the error file could be chosen freely.
-
You can now specify the default (base) name of the logging file in the configuration (
Logger
→ICOC
→FILENAME
). -
You can now specify the directory where ICOc stores acceleration data in the configuration (
Logger
→ICOC
→DIRECTORY
).
Verification Tests
We added the old code of the STH verification tests. You can now execute these tests using the command
test-sth-verification
For more information about these tests, please take a look at the section “Verification Tests” here.
Internal
Message
- The string representation of a message (
repr
) now includes additional information for- the “Bluetooth Write Energy Mode Reduced” command
- the EEPROM command “Read Write Request Counter”
- The code for the string representation now handles incorrect device number values for the acknowledgment message of the
Get number of available devices
properly - The method
acknowledge
does not ignore the value of theerror
parameter any more
Version 1.0.13
Documentation
- The repo now contains a bookdown project for the documentation. The latest version of the bookdown output (HTML, PDF, and EPUB) is available at GitHub (just click on the latest “run” and then on the link “ICOc Manual”) or in the Bitrix24 drive.
ICOc
- The data acquisition should now work more reliable, since we fixed
Production Test
-
The
- stationary acceleration test (
test_acceleration_single_value
), - supply voltage test (
test_battery_voltage
), - connection test (
test_connection
), and - EEPROM test (
test_eeprom
)
now use the new network class instead of the old network class
- stationary acceleration test (
Internal
Calibration
- Add class
CalibrationMeasurementFormat
to specify the data bytes of a calibration measurement command.
Measurement
- Add function
convert_voltage_adc_to_volts
to convert (2 byte) streaming voltage values to a supply voltage in volts
Message
- The string representation of a message (
repr
) now includes additional information for the Get/Set State block command
Network
- Add the coroutine
get_state
to retrieve information about the current state of a node - Add the coroutine
read_voltage
to read the supply voltage of a connected STH - Add the coroutine
read_x_acceleration
to read the x acceleration of a connected STH
Streaming Format
- New class
StreamingFormat
to specify the format of streaming data - New class
StreamingFormatVoltage
to specify the format of voltage streaming data - New class
StreamingFormatAcceleration
to specify the format of acceleration streaming data
Utility
- The new function
add_commander_path_to_environment
adds the path to Simplicity Commander (commander
) to thePATH
environment variable
Version 1.0.12
Config
-
We now use the common term “version” instead of “revision” to specify the current state of the hardware. We therefore renamed
STH
→HARDWARE REVISION
toSTH
→HARDWARE VERSION
in the configuration file.
ICOc
- The menu for a connected STH now displays the correct STH name instead of the text “Tanja”.
- The main menu now uses “ICOc” instead of “MyToolIt Terminal” as title
Internal
Network
-
Add the coroutines
read_eeprom_advertisement_time_2
,read_eeprom_batch_number
,read_eeprom_firmware_version
,read_eeprom_gtin
,read_eeprom_hardware_version
,read_eeprom_oem_data
,read_eeprom_operating_time
,read_eeprom_power_off_cycles
,read_eeprom_power_on_cycles
,read_eeprom_product_name
,read_eeprom_production_date
,read_eeprom_release_name
,read_eeprom_serial_number
,read_eeprom_sleep_time_2
,read_eeprom_under_voltage_counter
,read_eeprom_watchdog_reset_counter
,read_eeprom_x_axis_acceleration_offset
, andread_eeprom_x_axis_acceleration_slope
to read specific values of the EEPROM
-
Add the coroutines
write_eeprom_advertisement_time_2
,write_eeprom_batch_number
,write_eeprom_firmware_version
,write_eeprom_gtin
,write_eeprom_hardware_version
,write_eeprom_oem_data
,write_eeprom_operating_time
,write_eeprom_power_off_cycles
,write_eeprom_power_on_cycles
,write_eeprom_product_name
,write_eeprom_production_date
,write_eeprom_release_name
,write_eeprom_serial_number
,write_eeprom_sleep_time_2
,write_eeprom_under_voltage_counter
,write_eeprom_watchdog_reset_counter
,write_eeprom_x_axis_acceleration_offset
, andwrite_eeprom_x_axis_acceleration_slope
to change specific values in the EEPROM
-
Add the following coroutines to read product data:
Name Data Item get_gtin
GTIN (Global Trade Identification Number) get_hardware_version
Hardware Version Number get_firmware_version
Firmware Version Number get_firmware_release_name
Firmware Release Name get_serial_number
Serial Number get_product_name
Product Name get_oem_data
OEM (Free Use) Data
Status
- Add wrapper class for the
Get/Set State
command
Version 1.0.11
Documentation
EEPROM Checker
- The EEPROM checker (
check-eeprom
) now uses the new network class.
ICOc
- We fixed the sporadic crashes of the graphical plotter interface. You should not see messages about “WinError 10061” any more, when you try to read acceleration data with
icoc
.
STH Test
- The test now uses the serial number (
STH
→SERIAL NUMBER
) as new name, if you set the status (STH
→STATUS
) toEpoxied
in the configuration. If you use use a different status, then the test will still use the Base64 encoded MAC address as new (Bluetooth advertisement) name. - Remove wait time (of 2 seconds) after Bluetooth connection was established. In theory this should make the test execution quite a bit faster, without any adverse effects.
Internal
Message
-
The string representation of a message (
repr
) now includes additional information for:
Network (Old)
- Improve error message for disconnected CAN adapter
Network (New)
-
The class now sends requests multiple times, if it does not receive an answer in a certain amount of time
-
Improve error message for disconnected CAN adapter
-
The class now logs sent and received messages on the CAN bus, if you change the logger level to
DEBUG
(LOGGER
→CAN
→LEVEL
in the configuration) -
Renamed the following coroutines:
Old Name New Name get_available_devices_bluetooth
get_available_devices
get_device_name_bluetooth
get_name
get_mac_address_bluetooth
get_mac_address
connect_device_number_bluetooth
connect_with_device_number
check_connection_device_bluetooth
is_connected
-
Add the following coroutines
Name Description connect_with_mac_address
Connect to a device using its MAC address get_rssi
Retrieve the RSSI (Received Signal Strength Indication) of a device get_sths
Retrieve a list of available STHs connect_sth
Directly connect to an STH using its
• MAC address,
• device number, or
• nameset_name
Set the (Bluetooth advertisement) name of an STU or STH -
Add coroutines:
read_eeprom
,read_eeprom_float
,read_eeprom_int
, andread_eeprom_text
to read EEPROM data
-
Add coroutines
write_eeprom
,write_eeprom_float
,write_eeprom_int
, andwrite_eeprom_text
,
to write EEPROM data
-
Add the coroutines:
read_eeprom_advertisement_time_1
,read_eeprom_name
,read_eeprom_sleep_time_1
, andread_eeprom_status
to read specific parts of the EEPROM
-
Add the coroutines:
write_eeprom_advertisement_time_1
,write_eeprom_name
,write_eeprom_sleep_time_1
, andwrite_eeprom_status
to write specific parts of the EEPROM
Version 1.0.10
Checks
- We also check the code base with the static type checker Mypy
GitHub Actions
- We now also test ICOc on Ubuntu Linux
Package
- We now use the version number specified in the init file of the package for the package version number.
- You can now also install the Package on Linux (and macOS)
Requirements
- The package now uses the
EUI
(Extended Unique Identifier) class of thenetaddr
package to handle MAC addresses
Scripts
- We added a script that removes log and PDF files from the repository root. For more information please take a look at the section “Remove Log and PDF Files” of the script documentation.
STH Test
- The report of the STH test now also contains information about the used acceleration sensor (±100 g or ± 50 g)
- We added a configuration item for the holder type (
STH
→HOLDER TYPE
) - We added the holder type and the serial number to the PDF report
- Removed extra space before and after headers in PDF report
- The PDF report now contains a list of tables with checkboxes for manual checks
Internal
Checkbox
- New
Flowable
class that can be used to add a checkbox to a PDF report
Command
- Add method
is_error
to check if the current command represents an error - Add method
set_error
to set or unset the error bit
Identifier
- Add method
acknowledge
to retrieve expected acknowledgment identifier for id - Add method
is_error
to check if the current identifier represents an error message - Add method
set_error
to set or unset the error bit - Support comparison with other identifiers (
==
)
Message
- The class now uses the class
Message
of python-can to store data instead of the classTPCANMsg
of the PCAN-Basic API - Add method
identifier
to receive an identifier object for the current message - Add accessor to set and retrieve message data (
.data
) - The method
acknowledge
now stores the data of the message in the acknowledgment message - Fix conversion into
python-can
message for non-empty data field - Add explanation to string representation for Bluetooth “Activate” and “Get number of available devices” subcommand
Network (New)
- Add coroutine (
reset_node
) to reset a node in the network - Add coroutine (
activate_bluetooth
) to activate Bluetooth on a node in the network - Add coroutine (
get_available_devices_bluetooth
) to retrieve the number of available Bluetooth devices - Add coroutine (
get_device_name_bluetooth
) to retrieve the Bluetooth advertisement name of a device - Add coroutine (
connect_device_number_bluetooth
) to connect to a Bluetooth device using the device number - Add coroutine (
deactivate_bluetooth
) to deactivate the Bluetooth connection of a node - Add coroutine (
check_connection_device_bluetooth
) to check if a Bluetooth device is connected to a node - Add coroutine (
get_mac_address_bluetooth
) to retrieve the MAC address of a connected Bluetooth device - Implement context manager interface (
with … as
) - The code now checks part of the acknowledgement data for the Bluetooth and reset commands of the
System
block
Report
- Add method
add_checkbox_list
to add a list of checkboxes at the end of the PDF report
Utility
- Add function
bytearray_to_text
to convert byte data to a string
Version 1.0.9
Configuration
- We moved the configuration file for the test scripts into the
mytoolit
package. - We moved the configuration file for ICOc into the
mytoolit
package. - We now use uppercase letters for all configuration keys in
config.yaml
. The reason behind this update is that we can overwrite these values using environment variables – with the prefixDYNACONF_
– even on Windows. Unfortunately Windows converts all environment variables to uppercase.
Compatibility
- This version of ICOc requires at least Python
3.7
, since we use theannotations
directive from the__futures__
module
Package
- We added a package description for ICOc. You can now install the software using
pip install -e .
in the root of the repository. To uninstall the package usepip uninstall icoc
.
Scripts
- We added a new EEPROM checking tool. For more information please take a look at the section “EEPROM Check” of the script documentation.
Internal
- We removed old hardware test code
Network (Old)
- Simplified code
Version 1.0.8
Internal
Message
- Added method to convert message to python-can message object
- Renamed initialization attribute
payload
todata
- Added support to initialize a message object with a message object of python-can
Production Test
- The name of the PDF test report now reflects the tested node. The latest test data for the STH will be stored in a file called
STH Test.pdf
, while the STU test data is stored in a file calledSTU Test.pdf
. Before this update both tests would use the file nameReport.pdf
.
STH Test
-
We now always assume the name of the STH (
STH
→Name
) in the [configuration][configuration file] is given as string. This improves the usability of the tests, since otherwise you might specify an integer as name (e.g.1337
) and wonder why the test is unable to connect to the STH. -
The STH test now prints a message about a possible incorrect config value for the acceleration sensor (
STH
→Acceleration Sensor
→Sensor
), if the self test of the accelerometer failed. -
The STH test fails, if you use an sensor value (
STH
→Acceleration Sensor
→Sensor
) that is not one of the supported valuesADXL1001
orADXL1002
.
Tests
- We now check the code base with flake8.
- We use GitHub actions
- to run non-hardware dependent parts of the automated tests, and
- to check the code base with flake8