SmartThingsEdgeDrivers icon indicating copy to clipboard operation
SmartThingsEdgeDrivers copied to clipboard

SmartSense Multi: Fix handling of large negative threeAxis values

Open tpmanley opened this issue 1 year ago • 3 comments

The convert_to_signedInt16 function had a bug preventing it from handling large negative threeAxis values. This would impact the garage door handling since in the typical orientation the sensor will report approximately -1000 for the Z axis when the door is open.

https://smartthings.atlassian.net/browse/CHAD-13097

tpmanley avatar May 04 '24 20:05 tpmanley

Channel deleted.

github-actions[bot] avatar May 04 '24 20:05 github-actions[bot]

Test Results

   57 files  ±0    364 suites  ±0   0s :stopwatch: ±0s 1 761 tests +4  1 761 :white_check_mark: +4  0 :zzz: ±0  0 :x: ±0  3 055 runs  +4  3 055 :white_check_mark: +4  0 :zzz: ±0  0 :x: ±0 

Results for commit c37b3238. ± Comparison against base commit ae1ea7d2.

This pull request removes 2 and adds 6 tests. Note that renamed tests count towards both.
Report from cluster 0xFC03, command 0x05 should be handled as: threeAxis(1050, -3, 9)
Report from cluster 0xFC03, command 0x05 should be handled as: threeAxis(1123,-130,-24)
Report from cluster 0xFC03, command 0x05 should be handled as: threeAxis(-10, -1020, -7)
Report from cluster 0xFC03, command 0x05 should be handled as: threeAxis(-1050, -3, -9)
Report from cluster 0xFC03, command 0x05 should be handled as: threeAxis(-116, -4, -1003)
Report from cluster 0xFC03, command 0x05 should be handled as: threeAxis(10, 1020, 7)
Report from cluster 0xFC03, command 0x05 should be handled as: threeAxis(1050, 3, 9)
Report from cluster 0xFC03, command 0x05 should be handled as: threeAxis(116, 4, 1003)

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar May 04 '24 20:05 github-actions[bot]

File Coverage
All files 99% :white_check_mark:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-contact/src/smartsense-multi/init.lua 95% :white_check_mark:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-contact/src/multi-sensor/init.lua 97% :white_check_mark:

Minimum allowed coverage is 90%

Generated by :monkey: cobertura-action against c37b3238337457dbb0767247f3b32dfd9af70b92

github-actions[bot] avatar May 04 '24 20:05 github-actions[bot]