@brief Draw a counter @param mac Destination mac @param taginfo Tag information @param cfgobj Tag config as json object @param filename Filename @param imageParams Image parameters @param nextupdate Next counter update @param nextCheckin Next tag checkin
| 145 | /// @param nextupdate Next counter update |
| 146 | /// @param nextCheckin Next tag checkin |
| 147 | void drawCounter(const uint8_t mac[8], tagRecord *&taginfo, JsonObject &cfgobj, String &filename, imgParam &imageParams, const uint32_t nextupdate, const uint16_t nextCheckin) { |
| 148 | int32_t counter = cfgobj["counter"].as<int32_t>(); |
| 149 | bool buttonPressed = false; |
| 150 | if (buttonPressed) { // fixme: button pressed |
| 151 | counter = 0; |
| 152 | } |
| 153 | drawNumber(filename, counter, (int32_t)cfgobj["thresholdred"], taginfo, imageParams); |
| 154 | taginfo->nextupdate = nextupdate; |
| 155 | updateTagImage(filename, mac, (buttonPressed ? 0 : nextCheckin), taginfo, imageParams); |
| 156 | cfgobj["counter"] = counter + 1; |
| 157 | } |
| 158 | |
| 159 | void drawNew(const uint8_t mac[8], tagRecord *&taginfo) { |
| 160 | time_t now; |
no test coverage detected