mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-24 00:00:44 +01:00
[ion] Encode the serial number in Base64
Also, expose serialNumber() in Ion and keep "copySerialNumber" in Ion::Device. This allows the DFU bootloader to remain .bss-free.
This commit is contained in:
@@ -192,24 +192,13 @@ void SubController::willDisplayCellForIndex(HighlightCell * cell, int index) {
|
||||
}
|
||||
if (m_messageTreeModel->label() == I18n::Message::About) {
|
||||
myCell->setMessageFontSize(KDText::FontSize::Small);
|
||||
const char * accessoryMessage = nullptr;
|
||||
char serialNumber[Ion::SerialNumberLength+1];
|
||||
switch (index) {
|
||||
case 0:
|
||||
accessoryMessage = Ion::softwareVersion();
|
||||
break;
|
||||
case 1:
|
||||
Ion::getSerialNumber(serialNumber);
|
||||
accessoryMessage = serialNumber;
|
||||
break;
|
||||
case 2:
|
||||
accessoryMessage = Ion::fccId();
|
||||
break;
|
||||
default:
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
myCell->setAccessoryText(accessoryMessage);
|
||||
const char * messages[] = {
|
||||
Ion::softwareVersion(),
|
||||
Ion::serialNumber(),
|
||||
Ion::fccId()
|
||||
};
|
||||
assert(index >= 0 && index < 3);
|
||||
myCell->setAccessoryText(messages[index]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user