11/23/2023 0 Comments Arduino println longSize_t Print::print(int64_t number, int base)Īdditional code for 1.0x print.h // uncomment next line for int64 support Size_t Print::println(int64_t number, int base) Įxtra code to append to for 1.0x print.cpp #ifdef SUPPORT_LONGLONG Update => I had already patched print.cpp to use uint8_t for param base in all functions. Write((char) (buf remove printLLnumber() from print.h too Void Print::print(int64_t number, uint8_t base) Void Print::println(int64_t number, uint8_t base) not supported in 1.0 so will not be implemented. merged the printLLnumber into print(uint64_t, int) as that was the only one that called.Most important, I replaced the % math with less expensive code => test app size went from 9766 => 6966 Printing doubles I did not investigate yet but can be tackled in the same way as printing floats are handled using the printing of longs (on UNO)ĭid some rework on the printing of int64's. Void println(unsigned long, uint8_t = DEC) Ĭan you confirm this works on DUE? void setup() Void println(unsigned int, uint8_t = DEC) Void println(unsigned char, uint8_t = BYTE) Void print(unsigned long, uint8_t = DEC) Void print(unsigned char, uint8_t = BYTE) Virtual void write(const uint8_t *buffer, size_t size) Void printNumber(unsigned long, uint8_t) uncomment next line to support printing of 64 bit ints. Void Print::print(int64_t n, uint8_t base) Void Print::println(int64_t n, uint8_t base) Snippet for print.cpp #ifdef SUPPORT_LONGLONG Just received my first DUE yesterday not downloaded the IDE for that to play with it.Īdd this snippet to print.cpp to print the 64 bit integers, mind you! a simple sketch adds about 8KB! Should work for DUE too I guess, but is not tested other than on my UNO (so all disclaimers apply ). Made this code for printing int64_t and uint64_t some time ago on an UNO - IDE 0.22
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |