-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Closed
Labels
Area: BT&WifiBT & Wifi related issuesBT & Wifi related issuesType: ExampleIssue is related to specific example.Issue is related to specific example.
Milestone
Description
Board
Olimex ESP32 PoE ISO
Device Description
PoE PCB using the ESP32 WROOM 32UE
Hardware Configuration
Nothing special
Version
latest master (checkout manually)
IDE Name
Arduino IDE
Operating System
All
Flash frequency
80Mhz
PSRAM enabled
no
Upload speed
115200
Description
When low temperatures occur, and go below 0 C, the calculations do not seem to be correct. It appears that using these 16-bit values in a 32-bit INT doesn't detect/use twos complement to handle the negative numbers properly.
In my final code I moved to a "signed short" which seems to fix the issue.
Sketch
signed short value;
// extract the temperature
value = (cServiceData[TEMP_MSB] << 8) + cServiceData[TEMP_LSB];
Debug Message
No debug ... just wrong calculated values.
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.
Metadata
Metadata
Assignees
Labels
Area: BT&WifiBT & Wifi related issuesBT & Wifi related issuesType: ExampleIssue is related to specific example.Issue is related to specific example.
Type
Projects
Status
Done