-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve JSON number handling (continued). (#133)
* Improve JSON number handling (continued). - Change NOTE_LOWMEM to NOTE_C_LOW_MEM. If NOTE_C_LOW_MEM is defined, the old macro NOTE_LOWMEM is automatically defined. Same for NOTE_FLOAT, which was also removed. - Change JItoA, JAtoI, NoteSetEnvDefaultInt, and NoteGetEnvInt to use JINTEGER instead of long int. - Make JINTEGER a typedef for int64_t. Don't bother trying to save a few bytes in the NOTE_C_LOW_MEM case. - Make JNUMBER a typedef for double. On low memory platforms, double is often the same as float anyway (e.g. AVR). - Improve comment explaining the JINTEGER_MIN case in JItoA. - Simplify JSON_number_handling_test.cpp. * Make more fixes to number handling and NOTE_C_LOW_MEM code. - Remove #ifdef ERRDBG guard in i2cNoteReset. This was causing us to not call _I2CReset when we should have been. - Make JTIME a typedef for JUINTEGER. - Fix run_unit_tests.sh script so that it actually runs the tests with NOTE_C_LOW_MEM defined. - Use JAddIntToObject to add Unix timestamps to J objects in unit tests. This is necessary to avoid loss of precision when using JAddNumberToObject.
- Loading branch information
1 parent
1fcda0c
commit 5428d5a
Showing
20 changed files
with
105 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
* | ||
*/ | ||
|
||
#ifndef NOTE_LOWMEM | ||
#ifndef NOTE_C_LOW_MEM | ||
|
||
#include "n_lib.h" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.