diff --git a/library.properties b/library.properties index dbbb5b4..a397079 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=GFX4d -version=1.0.5 +version=1.0.6 author=4D Systems Pty Ltd maintainer=4D Systems Pty Ltd sentence=Graphics Library for the gen4-IoD by 4D Systems diff --git a/src/GFX4d.cpp b/src/GFX4d.cpp index f7a053f..5bf05e7 100644 --- a/src/GFX4d.cpp +++ b/src/GFX4d.cpp @@ -2,7 +2,7 @@ * * * 4D Systems GFX4d Library * * * -* Date: 16th August 2021 * +* Date: 12th September 2021 * * * * Description: Provides Graphics, Touch Control and SD Card functions * * for 4D Systems Gen4 IoD range of intelligent displays. * @@ -1074,13 +1074,34 @@ void GFX4d::UserImage(uint16_t ui, int altx, int alty) } void GFX4d::LedDigitsDisplaySigned(int16_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks) +{ + LedDigitsDisplaySigned((int64_t)newval, index, Digits, MinDigits, WidthDigit, LeadingBlanks, 0x7fff , 0x7fff); +} + +void GFX4d::LedDigitsDisplaySigned(int32_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks) +{ + LedDigitsDisplaySigned((int64_t)newval, index, Digits, MinDigits, WidthDigit, LeadingBlanks, 0x7fff , 0x7fff); +} + +void GFX4d::LedDigitsDisplaySigned(int64_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks) { LedDigitsDisplaySigned(newval, index, Digits, MinDigits, WidthDigit, LeadingBlanks, 0x7fff , 0x7fff); } void GFX4d::LedDigitsDisplaySigned(int16_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks, int16_t altx, int16_t alty) { - int16_t i, m, lstb, nv, digita[7]; + LedDigitsDisplaySigned((int64_t) newval, index, Digits, MinDigits, WidthDigit, LeadingBlanks, altx, alty); +} + +void GFX4d::LedDigitsDisplaySigned(int32_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks, int16_t altx, int16_t alty) +{ + LedDigitsDisplaySigned((int64_t) newval, index, Digits, MinDigits, WidthDigit, LeadingBlanks, altx, alty); +} + +void GFX4d::LedDigitsDisplaySigned(int64_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks, int16_t altx, int16_t alty) +{ + int16_t i, lstb, digita[21]; + int64_t m, nv; int leftpos = 0; nv = newval ; lstb = 1 ; @@ -1116,15 +1137,35 @@ void GFX4d::LedDigitsDisplaySigned(int16_t newval, uint16_t index, int16_t Digit } } -void GFX4d::LedDigitsDisplay(int16_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks) +void GFX4d::LedDigitsDisplay(uint16_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks) +{ + LedDigitsDisplay((uint64_t)newval, index, Digits, MinDigits, WidthDigit, LeadingBlanks, 0x7fff , 0x7fff); +} + +void GFX4d::LedDigitsDisplay(uint32_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks) +{ + LedDigitsDisplay((uint64_t)newval, index, Digits, MinDigits, WidthDigit, LeadingBlanks, 0x7fff , 0x7fff); +} + +void GFX4d::LedDigitsDisplay(uint64_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks) { LedDigitsDisplay(newval, index, Digits, MinDigits, WidthDigit, LeadingBlanks, 0x7fff , 0x7fff); } -void GFX4d::LedDigitsDisplay(int16_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks, int16_t altx, int16_t alty) +void GFX4d::LedDigitsDisplay(uint16_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks, int16_t altx, int16_t alty) +{ + LedDigitsDisplay((uint64_t) newval, index, Digits, MinDigits, WidthDigit, LeadingBlanks, altx, alty); +} + +void GFX4d::LedDigitsDisplay(uint32_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks, int16_t altx, int16_t alty) +{ + LedDigitsDisplay((uint64_t) newval, index, Digits, MinDigits, WidthDigit, LeadingBlanks, altx, alty); +} + +void GFX4d::LedDigitsDisplay(uint64_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks, int16_t altx, int16_t alty) { - int16_t i, k, lb; - int32_t l; + int16_t i, lb; + uint64_t l, k; l = 1; for (i = 1; i < Digits; i++) l *= 10; diff --git a/src/GFX4d.h b/src/GFX4d.h index 5bdac13..9a16cab 100644 --- a/src/GFX4d.h +++ b/src/GFX4d.h @@ -2,7 +2,7 @@ * * 4D Systems GFX4d Library * * - Date: 16th August 2021 + Date: 12th September 2021 * * Description: Provides Graphics, Touch Control and SD Card functions for 4D Systems Gen4 IoD range of intelligent displays. @@ -921,10 +921,18 @@ class GFX4d : public Print UserImages(uint16_t uis, int16_t frame, int offset, int16_t altx, int16_t alty), UserImages(uint16_t uisnb, int16_t framenb, int16_t newx, int16_t newy), UserImagesDR(uint16_t uino, int frames, int16_t uxpos, int16_t uypos, int16_t uwidth, int16_t uheight), - LedDigitsDisplay(int16_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks), - LedDigitsDisplay(int16_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks, int16_t altx, int16_t alty), + LedDigitsDisplay(uint16_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks), + LedDigitsDisplay(uint32_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks), + LedDigitsDisplay(uint64_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks), + LedDigitsDisplay(uint16_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks, int16_t altx, int16_t alty), + LedDigitsDisplay(uint32_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks, int16_t altx, int16_t alty), + LedDigitsDisplay(uint64_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks, int16_t altx, int16_t alty), LedDigitsDisplaySigned(int16_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks), + LedDigitsDisplaySigned(int32_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks), + LedDigitsDisplaySigned(int64_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks), LedDigitsDisplaySigned(int16_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks, int16_t altx, int16_t alty), + LedDigitsDisplaySigned(int32_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks, int16_t altx, int16_t alty), + LedDigitsDisplaySigned(int64_t newval, uint16_t index, int16_t Digits, int16_t MinDigits, int16_t WidthDigit, int16_t LeadingBlanks, int16_t altx, int16_t alty), DrawWidget(uint32_t Index, int16_t uix, int16_t uiy, int16_t uiw, int16_t uih, uint16_t frame, int16_t bar, bool images, uint8_t cdv), DrawImage(uint32_t Index, int16_t uix, int16_t uiy), UserCharacter(uint32_t *data, uint8_t ucsize, int16_t ucx, int16_t ucy, uint16_t color, uint16_t bgcolor),