Closed hippyau closed 3 years ago
Ah, yeah that didn't go to plan...
I just added...
if (!Display::Get()) return 0;
to...
uint16_t json_get_display(char *pOutBuffer, const uint16_t nOutBufferSize) {
if (!Display::Get()) return 0;
const bool isOn = !(Display::Get()->isSleep());
const uint16_t nLength = static_cast<uint16_t>(snprintf(pOutBuffer, nOutBufferSize, "{\"display\":%s}", isOn ? "true" : "false"));
return nLength;
}
Fix a linux segfault I was getting