From 7e1b4efbd2c4eb83d71591b8d0f596de412889fa Mon Sep 17 00:00:00 2001 From: Romain Goyet Date: Mon, 17 Jun 2019 11:26:53 +0200 Subject: [PATCH] [ion/device/display] Make sure the calibration is properly sent --- ion/src/device/shared/drivers/display.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ion/src/device/shared/drivers/display.cpp b/ion/src/device/shared/drivers/display.cpp index 20d5bb74f..5b29805f6 100644 --- a/ion/src/device/shared/drivers/display.cpp +++ b/ion/src/device/shared/drivers/display.cpp @@ -323,7 +323,8 @@ void initPanel() { const uint8_t * gammaCalibration = nullptr; uint32_t panelId = panelIdentifier(); if (panelId == 0x4E4101) { - const uint8_t calibration[] = {0xF0, 0x8, 0x12, 0x9, 0xC, 0x1A, 0x36, 0x57, 0x43, 0x29, 0x19, 0x15, 0x2D, 0x32}; + // Don't forget the "static" qualifier, otherwise this array can be deleted before reaching send_long_command + static const uint8_t calibration[] = {0xF0, 0x8, 0x12, 0x9, 0xC, 0x1A, 0x36, 0x57, 0x43, 0x29, 0x19, 0x15, 0x2D, 0x32}; gammaCalibration = calibration; } if (gammaCalibration != nullptr) {