-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtcMenuOBD.ino.backup
32 lines (26 loc) · 972 Bytes
/
tcMenuOBD.ino.backup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "tcMenuOBD_menu.h"
void setup() {
setupMenu();
}
void loop() {
taskManager.runLoop();
}
// see tcMenu list documentation on thecoderscorner.com
int CALLBACK_FUNCTION fnNewSubMenuSupportedPIDLISTRtCall(RuntimeMenuItem* item, uint8_t row, RenderFnMode mode, char* buffer, int bufferSize) {
switch(mode) {
case RENDERFN_INVOKE:
// TODO - your code to invoke goes here - row is the index of the item
return true;
case RENDERFN_NAME:
// TODO - each row has it's own name - 0xff is the parent item
ltoaClrBuff(buffer, row, 3, NOT_PADDED, bufferSize);
return true;
case RENDERFN_VALUE:
// TODO - each row can has its own value - 0xff is the parent item
buffer[0] = 'V'; buffer[1]=0;
fastltoa(buffer, row, 3, NOT_PADDED, bufferSize);
return true;
case RENDERFN_EEPROM_POS: return 0xffff; // lists are generally not saved to EEPROM
default: return false;
}
}