Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 9:c830667212f4, committed 2021-11-01
- Comitter:
- wavenumber
- Date:
- Mon Nov 01 19:49:13 2021 +0000
- Parent:
- 8:0cf1573051e8
- Commit message:
- Fixed Thermocouple sign extend error
Changed in this revision
| DRIVERS/CHEM_BOX_COMMON.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/DRIVERS/CHEM_BOX_COMMON.cpp Wed Oct 06 14:27:21 2021 +0000
+++ b/DRIVERS/CHEM_BOX_COMMON.cpp Mon Nov 01 19:49:13 2021 +0000
@@ -319,7 +319,7 @@
InternalTemp = (int16_t)( ( (ThermocoupleData>>4) & 0xFFF));
- if(ThermocoupleData & (0x10000000))
+ if(ThermocoupleData & (0x80000000))
ThermocoupleTemp = (int16_t)(((ThermocoupleData>>18) & 0x2FFF) | 0xC000); //Sign extend in this case.... we need to map a 14 bit signed number to 16-bits
else
ThermocoupleTemp = (int16_t)(((ThermocoupleData>>18) & 0x2FFF));
