MyTooliT / ICOc

ICOc is a tool to control the ICOtronic system, acquire data, and test stationary transceiver units and sensory tool holders.
https://mytoolit.github.io/ICOc/
2 stars 0 forks source link

50g Sensor values #13

Closed LoydIrrving closed 3 years ago

LoydIrrving commented 3 years ago

The values of the 50g Sensor (......002 dont know his exact name atm) need to be optimised. Today the values of the sensor were about 153mV at the selftest and faild cause bigger than 110mV. Needs checkup what the "correct" values for the test are.

sanssecours commented 3 years ago

Thank you for the bug report. Is it possible that the STHAcceleration SensorSensor configuration value

https://github.com/MyTooliT/ICOc/blob/6afb27a7841e530eef6c25ab13d15dde5f4c92c9/Configuration/config.yaml#L104-L112

was not correct when you executed the test? When I use the incorrect value (ADXL1001) for an STH with the ADXL1002 sensor the test also fails on my machine with a similar error:

AssertionError: 152.7763790341039 not less than or equal to 110 : Measured voltage difference of 153 mV is greater than expected minimum voltage difference of 110 mV

The latest version of the code now adds the incorrect config value as possible failure reason to the explanation:

AssertionError: 157.7111467154955 not less than or equal to 110 : Measured voltage difference of 158 mV is greater than expected minimum voltage difference of 110 mV

Possible Reason:

• Acceleration sensor config value “ADXL1001” is incorrect

Hopefully this error message improves the usability of the specific test. If you have a better option on how to handle the different sensors – apart from changing the config value – then please just comment below. If the incorrect config value was not the reason for the test failure, then please reopen this issue.

LoydIrrving commented 3 years ago

Error was found. The config file had an spelling mistake at the Sensor option made when it was used. Choosen sensor had ADCL1002 instead of ADXL1002. Is now working and needs no fix.

sanssecours commented 3 years ago

Thank you for the quick update. The latest version of ICOc should handle spelling mistakes better:

ValueError: Unsupported sensor: “ADCL1002”

Please use one of the supported sensor configuration values “ADXL1001” or “ADXL1002”