Join GitHub today
ict-pdu os: Fixed polling for state sensor. #8558
Removed if/else statement. Code was reading an index that was out of bounds (for sensor_index greater than 0) resulting in sensor_value of 0 which did not map to any state.
DO NOT DELETE THIS TEXT
If you would like to test this pull request then please run:
The if/else structure was causing the odd behaviour seen above. The first fuse port was correctly assigned a sensor_value, but all other fuse ports (due to the else structure) was given a sensor_value of 0 which does not map to anything.
The code was attempting to append '.0' to the oid and read the snmp value - but no such index exists. Not sure why the if/else structure was originally necessary, as the polling works fine without the if/else as seen below.
Any chance you could add test data for this device?