Skip to content

Commit c6d01e9

Browse files
saving progress
1 parent de425b6 commit c6d01e9

File tree

2 files changed

+3
-84
lines changed

2 files changed

+3
-84
lines changed

examples/Inkplate6COLOR/Diagnostics/Inkplate6COLOR_Peripheral_Mode/InkplatePeripheralMode.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,16 +1016,10 @@ void PeripheralMode::parseCommand(int _command, int _repeat, int _payloadSize, c
10161016
char *_arg1;
10171017
_arg1 = getArgument(_payload, _payloadSize, _numberOfArgs, 0, NULL);
10181018

1019-
_display->selectDisplayMode(atol(_arg1));
1020-
break;
1021-
}
1022-
case CMD_GET_MODE:
1023-
{
1024-
char response[1];
1025-
itoa(_display->getDisplayMode(), response, 10);
1026-
sendResponse(CMD_GET_MODE, strlen(response), response);
1019+
_display->selectDisplayMode((uint8_t)atol(_arg1));
10271020
break;
10281021
}
1022+
10291023
case CMD_CLEAR_DISPLAY:
10301024
{
10311025
// No payload check needed, just clear the display

examples/Inkplate6COLOR/Diagnostics/Inkplate6COLOR_Peripheral_Mode/commandList.h

Lines changed: 1 addition & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -30,44 +30,8 @@
3030
#define CMD_DRAW_BITMAP 0x0021
3131
#define CMD_DRAW_IMAGE 0x0022
3232
#define CMD_SET_MODE 0x0023
33-
#define CMD_GET_MODE 0x0024#ifndef __COMMAND_LIST_H__
34-
#define __COMMAND_LIST_H__
35-
36-
#define CMD_PING 0x0001
37-
// Commands from 0x01 to 0x0A are reserved for future use. Command 0x00 is invalid!
38-
39-
#define CMD_DRAW_PIXEL 0x000A
40-
#define CMD_DRAW_LINE 0x000B
41-
#define CMD_DRAW_FASTVLINE 0x000C
42-
#define CMD_DRAW_FASTHLINE 0x000D
43-
#define CMD_DRAW_RECT 0x000E
44-
#define CMD_DRAW_CIRCLE 0x000F
45-
#define CMD_DRAW_TRIANGLE 0x0010
46-
#define CMD_DRAW_ROUND_RECT 0x0011
47-
#define CMD_DRAW_THICK_LINE 0x0012
48-
#define CMD_DRAW_ELIPSE 0x0013
49-
#define CMD_FILL_RECT 0x0014
50-
#define CMD_FILL_CIRCLE 0x0015
51-
#define CMD_FILL_TRIANGLE 0x0016
52-
#define CMD_FILL_ROUND_RECT 0x0017
53-
#define CMD_FILL_ELIPSE 0x0018
54-
#define CMD_PRINT 0x0019
55-
#define CMD_SET_TEXT_SIZE 0x001A
56-
#define CMD_SET_TEXT_COLOR 0x001B
57-
#define CMD_SET_CURSOR 0x001C
58-
#define CMD_SET_TEXT_WRAP 0x001D
59-
#define CMD_SET_ROTATION 0x001E
60-
#define CMD_SD_CARD_INIT 0x001F
61-
#define CMD_SD_CARD_SLEEP 0x0020
62-
#define CMD_DRAW_BITMAP 0x0021
63-
#define CMD_DRAW_IMAGE 0x0022
64-
#define CMD_SET_MODE 0x0023
65-
#define CMD_GET_MODE 0x0024
6633
#define CMD_CLEAR_DISPLAY 0x0025
6734
#define CMD_DISPLAY 0x0026
68-
#define CMD_PARTIAL_UPDATE 0x0027
69-
#define CMD_READ_TEMP 0x0028
70-
#define CMD_READ_TOUCHPAD 0x0029
7135
#define CMD_READ_BATTERY 0x002A
7236
#define CMD_EINK_PMIC 0x002B
7337
#define CMD_RTC_SET_TIME 0x002C
@@ -102,43 +66,4 @@
10266
// #define CMD_ 0x0046
10367
// #define CMD_ 0x0047
10468

105-
#endif
106-
#define CMD_CLEAR_DISPLAY 0x0025
107-
#define CMD_DISPLAY 0x0026
108-
#define CMD_PARTIAL_UPDATE 0x0027
109-
#define CMD_READ_TEMP 0x0028
110-
#define CMD_READ_TOUCHPAD 0x0029
111-
#define CMD_READ_BATTERY 0x002A
112-
#define CMD_RTC_SET_TIME 0x002C
113-
#define CMD_RTC_SET_DATE 0x002D
114-
#define CMD_RTC_SET_EPOCH 0x002E
115-
#define CMD_RTC_UPDATE 0x002F
116-
#define CMD_RTC_GET_DATA_ALL 0x0030
117-
#define CMD_RTC_SET_ALARM 0x0031
118-
#define CMD_RTC_SET_ALARM_EPOCH 0x0032
119-
#define CMD_RTC_CLEAR_AL_FLAG 0x0033
120-
#define CMD_RTC_GET_ALARM_ALL 0x0034
121-
#define CMD_RTC_SET_TIMER 0x0035
122-
#define CMD_RTC_GET_TIMER_FLAG 0x0036
123-
#define CMD_RTC_CLEAR_TIMER_FLAG 0x0037
124-
#define CMD_RTC_DISABLE_TIMER 0x0038
125-
#define CMD_RTC_IS_SET 0x0039
126-
#define CMD_RTC_RESET 0x003A
127-
#define CMD_ESP32_DEEPSLEEP 0x003B
128-
#define CMD_ESP32_LIGHTSLEEP 0x003C
129-
#define CMD_TOUCH_INIT 0x003D
130-
#define CMD_TOUCH_AVAILABLE 0x003E
131-
#define CMD_TOUCH_GET_DATA 0x003F
132-
#define CMD_DRAW_IMAGE_BUFFER 0x0040
133-
#define CMD_CONNECT_WIFI 0x0041
134-
#define CMD_DISCONNECT_WIFI 0x0042
135-
#define CMD_GET_REQUEST 0x0043
136-
#define CMD_POST_REQUEST 0x0044
137-
// #define CMD_ 0x0042
138-
// #define CMD_ 0x0043
139-
// #define CMD_ 0x0044
140-
// #define CMD_ 0x0045
141-
// #define CMD_ 0x0046
142-
// #define CMD_ 0x0047
143-
144-
#endif
69+
#endif

0 commit comments

Comments
 (0)