Module_LcmControl.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431
  1. #ifndef MODULE_LCM_CTRL_H_
  2. #define MODULE_LCM_CTRL_H_
  3. //------------------------------------------------------------------------------
  4. #define DEFAULT_AC_INDEX (2)
  5. #define TIME_MAX_SEC (2592000) // 一個月,秒數
  6. #define POWER_MAX_KW (5000)
  7. #define ENERGY_MAX_KWH (5000)
  8. #define CMD_TITLE_1 (0x5A)
  9. #define CMD_TITLE_2 (0xA5)
  10. #define CMD_READ (0x80)
  11. #define CMD_WRITE (0x81)
  12. #define CMD_MULTI_WRITE (0x82)
  13. #define CMD_MULTI_READ (0x83)
  14. #define CMD_BACKLIGHT (0x01)
  15. #define CMD_REGISTER (0x03)
  16. //#define NOODOE_QR_CODE_URL "https://ev-alpha-test.noodoe.com/station?id=" ////For Audi
  17. #define NOODOE_QR_CODE_URL "https://ev.noodoe.com/station?id=" ////For Audi
  18. #define LEFT_GUN_LOCAL_NAME "1A"
  19. #define RIGHT_GUN_LOCAL_NAME "1B"
  20. // Page
  21. #define __VIEW_ALL_IDLE_ 0x0001
  22. #define __VIEW_LEFT_CHARGE_ 0x0002
  23. #define __VIEW_RIGHT_CHARGE_ 0x0003
  24. #define __VIEW_ALL_CHARGE_ 0x0004
  25. #define __START_SCAN_LEFT 0x0005
  26. #define __START_AUTHORIZE_ 0x0006
  27. #define __START_AUTHORIZE_FAIL_LEFT 0x0007
  28. #define __WAIT_PLUGIN_ 0x0008
  29. #define __LINKING_ERROR_LEFT 0x0009
  30. #define __PRE_CHARGE_ 0x000A
  31. #define __VIEW_ALL_FAIL 0x000B
  32. #define __VIEW_L_FAIL_R_CHARGE 0x000C
  33. #define __VIEW_L_CHARGE_R_FAIL 0x000D
  34. /*
  35. #define __DETAIL_VIEW_ 0x000B
  36. #define __STOP_SCAN_RFID_ 0x000C
  37. #define __STOP_SCAN_APP_ 0x000D
  38. */
  39. #define __STOP_AUTHORIZE_ 0x000E
  40. //#define __STOP_RFID_FAIL_ 0x000F
  41. #define __WAIT_PLUGOUT_LEFT 0x0010
  42. #define __SUMMARY_LEFT 0x0011
  43. #define __EMERGENCY_BUTTON_ 0x0012
  44. #define __MAINTAIN_PAGE_ 0x0013
  45. #define __ERROR_PAGE_LEFT 0x0014
  46. #define __SHOW_CABIENT_VERSION 0x0015
  47. #define __SHOW_DISPENSER_VERASION 0x0016
  48. #define __LINKING_ERROR_RIGHT 0x0017
  49. #define __START_AUTHORIZE_FAIL_RIGHT 0x0018
  50. #define __CONFIRM_STOP_LEFT 0x0019
  51. #define __CONFIRM_STOP_RIGHT 0x001A
  52. #define __WAIT_PLUGOUT_RIGHT 0x001B
  53. #define __SUMMARY_RIGHT 0x001C
  54. #define __ERROR_PAGE_RIGHT 0x001D
  55. #define __WAIT_PLUGIN_RIGHT 0x001E
  56. #define __START_SCAN_RIGHT 0x001F
  57. #define __PRECHARGE_LEFT_CONNECT 0x0020
  58. #define __PRECHARGE_LEFT_CHECK 0x0021
  59. #define __PRECHARGE_LEFT_START 0x0022
  60. #define __VIEW_L_FAIL_R_IDLE 0x0023
  61. #define __VIEW_L_IDLE_R_FAIL 0x0024
  62. #define __PRECHARGE_RIGHT_CONNECT 0x0025
  63. #define __PRECHARGE_RIGHT_CHECK 0x0026
  64. #define __PRECHARGE_RIGHT_START 0x0027
  65. #define __VIEW_L_IDLE_R_MAINTAIN 0x0028
  66. #define __VIEW_L_MAINTAIN_R_IDLE 0x0029
  67. #define __VIEW_L_CHARGE_R_MAINTAIN 0x002A
  68. #define __VIEW_L_MAINTAIN_R_CHARGE 0x002B
  69. #define __VIEW_L_IDLE_R_OUT 0x002C
  70. #define __VIEW_L_OUT_R_IDLE 0x002D
  71. #define __VIEW_L_CHARGE_R_OUT 0x002E
  72. #define __VIEW_L_OUT_R_CHARGE 0x002F
  73. #define __VIEW_L_MAINTAIN_R_OUT 0x0030
  74. #define __VIEW_L_OUT_R_MAINTAIN 0x0031
  75. #define __VIEW_L_OUT_R_OUT 0x0032
  76. #define __VIEW_L_FAIL_R_OUT 0x0033
  77. #define __VIEW_L_OUT_R_FAIL 0x0034
  78. #define __VIEW_L_LINK_R_IDLE 0x0035
  79. #define __VIEW_L_LINK_R_CHARGE 0x0036
  80. #define __VIEW_L_LINK_R_OUT 0x0037
  81. #define __VIEW_L_LINK_R_FAIL 0x0038
  82. #define __VIEW_L_LINK_R_MAINTAIN 0x0039
  83. #define __VIEW_L_IDLE_R_LINK 0x003A
  84. #define __VIEW_L_CHARGE_R_LINK 0x003B
  85. #define __VIEW_L_OUT_R_LINK 0x003C
  86. #define __VIEW_L_FAIL_R_LINK 0x003D
  87. #define __VIEW_L_MAINTAIN_R_LINK 0x003E
  88. #define __VIEW_L_MAINTAIN_R_FAIL 0x003F
  89. #define __VIEW_L_FAIL_R_MAINTAIN 0x0040
  90. #define __VIEW_L_FAIL_R_FAIL 0x0041
  91. // ICON Map Address
  92. #define _LeftGun_type_pic_U 0x0001
  93. #define _LeftGun_type_pic_L 0x0003
  94. #define _LeftGun_type_name 0x0005
  95. #define _LeftGun_type_speed 0x0007
  96. #define _LeftGun_Soc_Digits 0x0009
  97. #define _LeftGun_Soc_Tens 0x000B
  98. #define _LeftGun_Soc_Hundreds 0x000D
  99. #define _RightGun_type_pic_U 0x0011
  100. #define _RightGun_type_pic_L 0x0013
  101. #define _RightGun_type_name 0x0015
  102. #define _RightGun_type_speed 0x0017
  103. #define _RightGun_Soc_Digits 0x0019
  104. #define _RightGun_Soc_Tens 0x001B
  105. #define _RightGun_Soc_Hundreds 0x001D
  106. #define _Confirm_Gun_Left_symbol 0x0021
  107. #define _Confirm_Gun_Right_symbol 0x0023
  108. #define _ProgressBar_LEVEL 0x0025
  109. #define _LeftGun_Symbol_Icon 0x0027
  110. #define _RightGun_Symol_Icon 0x0029
  111. #define _Percent_Number_Digits 0x0031
  112. #define _Percent_Number_Tens 0x0033
  113. #define _Percent_Number_Hundreds 0x0035
  114. #define _Animation_Communcation 0x0037
  115. #define _Animation_GFD 0x0039
  116. #define _Animation_Precharge 0x003B
  117. #define _Animation_Running 0x003D
  118. #define _LeftGun_ConnectorId 0x003F
  119. #define _RightGun_ConnectorId 0x0041
  120. #define _LeftGun_info_time 0x0043
  121. #define _LeftGun_info_cap 0x0047
  122. #define _LeftGun_info_money 0x0049
  123. #define _RightGun_info_time 0x004B
  124. #define _RightGun_info_cap 0x0051
  125. #define _RightGun_info_money 0x0053
  126. #define _Icon_Warming0 0x0055
  127. #define _Icon_Warming1 0x0057
  128. #define _Icon_Warming2 0x0059
  129. #define _Icon_Warming3 0x005B
  130. #define _Icon_Warming4 0x005D
  131. // String Map Address
  132. #define _LeftGun_location 0x0100
  133. #define _LeftGun_info_power 0x0110
  134. #define _LeftGun_info_power_number 0x0150
  135. #define _RightGun_location 0x0200
  136. #define _RightGun_info_power 0x0210
  137. #define _RightGun_info_power_number 0x0250
  138. #define _Confirm_Gun_Left_name 0x0300
  139. #define _Confirm_Gun_Right_name 0x0310
  140. #define _Count_Down_Time 0x0320
  141. #define _Detail_Power_Num 0x0330
  142. #define _Detail_Time_Num 0x0340
  143. #define _Detail_Cap_Num 0x0350
  144. #define _Detail_Money_Num 0x0360
  145. #define _Summary_total_money 0x0400
  146. #define _Summary_Start_time_hr 0x0410
  147. #define _Summary_Start_time_min 0x0414
  148. #define _Summary_Start_time_sec 0x0418
  149. #define _Summary_end_time_hr 0x0430
  150. #define _Summary_end_time_min 0x0434
  151. #define _Summary_end_time_sec 0x0438
  152. #define _Summary_duration_min 0x0450
  153. #define _Summary_max_power 0x0460
  154. #define _Summary_average_power 0x0470
  155. #define _Summary_cap 0x0480
  156. #define _Summary_cal_Total_money 0x0490
  157. #define _Summary_cal_discount 0x04A0
  158. #define _Summary_cal_Settlement 0x04B0
  159. #define _Summary_duration_sec 0x04C0
  160. #define _QR_CODE_AUTHORIZE 0x04D0
  161. #define _Text_Warming0 0x1100
  162. #define _Text_Warming1 0x1110
  163. #define _Text_Warming2 0x1120
  164. #define _Text_Warming3 0x1130
  165. #define _Text_Warming4 0x1140
  166. #define _Text_SystemID 0x1150
  167. #define _LCM_VERSION 0x1160
  168. int DemoPage[2] = {
  169. 17, // Left Gun summary
  170. 28, // Right Gun summary
  171. /*
  172. 1, // All Idle
  173. 5, // Left Gun authorize
  174. 6, // Authorizing
  175. 8, // Left gun plugin Gun
  176. 32, // preparing
  177. 33, // Prepare for EVSE
  178. 34, // Precharging
  179. 2, // Left Gun Charging
  180. 31, // Right Gun authorize
  181. 6, // Authorizing
  182. 30, // Right Gun plug in
  183. 32, // preparing
  184. 33, // Prepare for EVSE
  185. 34, // Precharging
  186. 04, // All Gun charging
  187. 25, // Stop Left Gun
  188. 16, // Left Gun plug out
  189. 17, // Left Gun summary
  190. 03, // Right gun charging
  191. 26, // Right Gun stop
  192. 27, // Right Gun Plug out
  193. 28, // Right Gun summary
  194. */
  195. };
  196. enum _ICON_LIST_ {
  197. _ICON_Empty,
  198. _ICON_CCS1_GUN_U = 1,
  199. _ICON_CCS1_GUN_L,
  200. _ICON_CCS2_GUN_U,
  201. _ICON_CCS2_GUN_L,
  202. _ICON_CCS1_Name,
  203. _ICON_CCS2_Name,
  204. _ICON_Speed,
  205. _ICON_High_Speed,
  206. _ICON_CCS1_Symbol,
  207. _ICON_CCS2_Symbol,
  208. _ICON_Power_Symbol,
  209. _ICON_Red_Num_0 = 31,
  210. _ICON_Red_Num_1,
  211. _ICON_Red_Num_2,
  212. _ICON_Red_Num_3,
  213. _ICON_Red_Num_4,
  214. _ICON_Red_Num_5,
  215. _ICON_Red_Num_6,
  216. _ICON_Red_Num_7,
  217. _ICON_Red_Num_8,
  218. _ICON_Red_Num_9,
  219. _ICON_Red_Percent,
  220. _ICON_White_Num_0,
  221. _ICON_White_Num_1,
  222. _ICON_White_Num_2,
  223. _ICON_White_Num_3,
  224. _ICON_White_Num_4,
  225. _ICON_White_Num_5,
  226. _ICON_White_Num_6,
  227. _ICON_White_Num_7,
  228. _ICON_White_Num_8,
  229. _ICON_White_Num_9,
  230. _ICON_White_Percent,
  231. _ICON_Card_Power,
  232. _ICON_Card_Time,
  233. _ICON_Card_Cap,
  234. _ICON_Card_Money,
  235. _ICON_CONNECTOR_1,
  236. _ICON_CONNECTOR_2,
  237. _ICON_CONNECTOR_A = 73,
  238. _ICON_CONNECTOR_B,
  239. _ICON_CONNECTOR_C,
  240. _ICON_CONNECTOR_D,
  241. _ICON_CONNECTOR_E,
  242. _ICON_CONNECTOR_F,
  243. /*
  244. _ICON_ProgressBar_10 = 60,
  245. _ICON_ProgressBar_10_cantrary,
  246. _ICON_ProgressBar_20,
  247. _ICON_ProgressBar_20_cantrary,
  248. _ICON_ProgressBar_30,
  249. _ICON_ProgressBar_30_cantrary,
  250. _ICON_ProgressBar_40,
  251. _ICON_ProgressBar_40_cantrary,
  252. _ICON_ProgressBar_50,
  253. _ICON_ProgressBar_50_cantrary,
  254. _ICON_ProgressBar_60,
  255. _ICON_ProgressBar_60_cantrary,
  256. _ICON_ProgressBar_70,
  257. _ICON_ProgressBar_70_cantrary,
  258. _ICON_ProgressBar_80,
  259. _ICON_ProgressBar_80_cantrary,
  260. _ICON_ProgressBar_90,
  261. _ICON_ProgressBar_90_cantrary,
  262. _ICON_ProgressBar_100,
  263. */
  264. _ICON_CUR_POWER = 79,
  265. _ICON_STRING_KW,
  266. _ICON_SPIN_0,
  267. _ICON_SPIN_1,
  268. _ICON_SPIN_2,
  269. _ICON_SPIN_3,
  270. _ICON_SPIN_4,
  271. _ICON_SPIN_5,
  272. _ICON_SPIN_6,
  273. _ICON_SPIN_7,
  274. _ICON_negative = 110,
  275. _ICON_BTY_12 = 112,
  276. _ICON_BTY_14 = 114,
  277. _ICON_BTY_16 = 116,
  278. _ICON_BTY_18 = 118,
  279. _ICON_BTY_20 = 120,
  280. _ICON_BTY_22 = 122,
  281. _ICON_BTY_24 = 124,
  282. _ICON_BTY_26 = 126,
  283. _ICON_BTY_28 = 128,
  284. _ICON_BTY_30 = 130,
  285. _ICON_BTY_32 = 132,
  286. _ICON_BTY_34 = 134,
  287. _ICON_BTY_36 = 136,
  288. _ICON_BTY_38 = 138,
  289. _ICON_BTY_40 = 140,
  290. _ICON_BTY_42 = 142,
  291. _ICON_BTY_44 = 144,
  292. _ICON_BTY_46 = 146,
  293. _ICON_BTY_48 = 148,
  294. _ICON_BTY_50 = 150,
  295. _ICON_BTY_52 = 152,
  296. _ICON_BTY_54 = 154,
  297. _ICON_BTY_56 = 156,
  298. _ICON_BTY_58 = 158,
  299. _ICON_BTY_60 = 160,
  300. _ICON_BTY_62 = 162,
  301. _ICON_BTY_64 = 164,
  302. _ICON_BTY_66 = 166,
  303. _ICON_BTY_68 = 168,
  304. _ICON_BTY_70 = 170,
  305. _ICON_BTY_72 = 172,
  306. _ICON_BTY_74 = 174,
  307. _ICON_BTY_76 = 176,
  308. _ICON_BTY_78 = 178,
  309. _ICON_BTY_80 = 180,
  310. _ICON_BTY_82 = 182,
  311. _ICON_BTY_84 = 184,
  312. _ICON_BTY_86 = 186,
  313. _ICON_BTY_88 = 188,
  314. _ICON_BTY_90 = 190,
  315. _ICON_BTY_92 = 192,
  316. _ICON_BTY_94 = 194,
  317. _ICON_BTY_96 = 196,
  318. _ICON_BTY_98 = 198,
  319. _ICON_BTY_100 = 200,
  320. _ICON_DASH_TWO = 233,
  321. _ICON_DASH_SINGLE = 234,
  322. };
  323. /* Show Version */
  324. #define _Version_Cabient_Name_Text 0x0500
  325. #define _Version_Cabient_BootLoader_Text 0x0510
  326. #define _Version_Cabient_Kernel_Text 0x0520
  327. #define _Version_Cabient_CSU_Text 0x0530
  328. #define _Version_Cabient_Priamry_Text 0x0540
  329. #define _Version_Cabient_Relay0_Text 0x0550
  330. #define _Version_Cabient_Relay1_Text 0x0560
  331. #define _Version_Cabient_Fan_Text 0x0570
  332. #define _Version_Cabient_IPAddr_Text 0x0580
  333. #define _Version_Cabient_PSU1_Text 0x0590
  334. #define _Version_Cabient_PSU2_Text 0x05A0
  335. #define _Version_Cabient_PSU3_Text 0x05B0
  336. #define _Version_Cabient_PSU4_Text 0x05C0
  337. #define _Version_Cabient_PSU5_Text 0x05D0
  338. #define _Version_Cabient_PSU6_Text 0x05E0
  339. #define _Version_Cabient_PSU7_Text 0x05F0
  340. #define _Version_Cabient_PSU8_Text 0x0600
  341. #define _Version_Cabient_PSU9_Text 0x0610
  342. #define _Version_Cabient_PSU10_Text 0x0620
  343. #define _Version_Cabient_PSU11_Text 0x0630
  344. #define _Version_Cabient_PSU12_Text 0x0640
  345. #define _Version_Cabient_Primary_Text 0x0920
  346. #define _Version_Cabient_Secondary_Text 0x0930
  347. #define _Version_Cabient_Model_value 0x0650
  348. #define _Version_Cabient_BootLoader_value 0x0660
  349. #define _Version_Cabient_Kernel_value 0x0670
  350. #define _Version_Cabient_CSU_value 0x0680
  351. #define _Version_Cabient_Priamry_value 0x0690
  352. #define _Version_Cabient_Relay0_value 0x06A0
  353. #define _Version_Cabient_Relay1_value 0x06B0
  354. #define _Version_Cabient_Fan_value 0x06C0
  355. #define _Version_Cabient_IPAddr_value 0x06D0
  356. #define _Version_Cabient_PSU_Prim1_value 0x06E0
  357. #define _Version_Cabient_PSU_Prim2_value 0x06F0
  358. #define _Version_Cabient_PSU_Prim3_value 0x0700
  359. #define _Version_Cabient_PSU_Prim4_value 0x0710
  360. #define _Version_Cabient_PSU_Prim5_value 0x0720
  361. #define _Version_Cabient_PSU_Prim6_value 0x0730
  362. #define _Version_Cabient_PSU_Sec1_value 0x0740
  363. #define _Version_Cabient_PSU_Sec2_value 0x0750
  364. #define _Version_Cabient_PSU_Sec3_value 0x0760
  365. #define _Version_Cabient_PSU_Sec4_value 0x0770
  366. #define _Version_Cabient_PSU_Sec5_value 0x0780
  367. #define _Version_Cabient_PSU_Sec6_value 0x0790
  368. #define _Version_Cabient_PSU_Prim7_value 0x09E0
  369. #define _Version_Cabient_PSU_Prim8_value 0x09F0
  370. #define _Version_Cabient_PSU_Prim9_value 0x1000
  371. #define _Version_Cabient_PSU_Prim10_value 0x1010
  372. #define _Version_Cabient_PSU_Prim11_value 0x1020
  373. #define _Version_Cabient_PSU_Prim12_value 0x1030
  374. #define _Version_Cabient_PSU_Sec7_value 0x1040
  375. #define _Version_Cabient_PSU_Sec8_value 0x1050
  376. #define _Version_Cabient_PSU_Sec9_value 0x1060
  377. #define _Version_Cabient_PSU_Sec10_value 0x1070
  378. #define _Version_Cabient_PSU_Sec11_value 0x1080
  379. #define _Version_Cabient_PSU_Sec12_value 0x1090
  380. #define _Version_Dispenser_Name_Text 0x07A0
  381. #define _Version_Dispenser_BootLoader_Text 0x07B0
  382. #define _Version_Dispenser_Kernel_Text 0x07C0
  383. #define _Version_Dispenser_CSU_Text 0x07D0
  384. #define _Version_Dispenser_Relay_Text 0x07E0
  385. #define _Version_Dispenser_Fan_Text 0x07F0
  386. #define _Version_Dispenser_Priamry_Text 0x0800
  387. #define _Version_Dispenser_LCM_Text 0x0810
  388. #define _Version_Dispenser_LED_Text 0x0820
  389. #define _Version_Dispenser_Connector0_Text 0x0830
  390. #define _Version_Dispenser_Connector1_Text 0x0840
  391. #define _Version_Dispenser_IPAddr_Text 0x0850
  392. #define _Version_Dispenser_Model_value 0x0860
  393. #define _Version_Dispenser_BootLoader_value 0x0870
  394. #define _Version_Dispenser_Kernel_value 0x0880
  395. #define _Version_Dispenser_CSU_value 0x0890
  396. #define _Version_Dispenser_Relay_value 0x08A0
  397. #define _Version_Dispenser_Fan_value 0x08B0
  398. #define _Version_Dispenser_Priamry_value 0x08C0
  399. #define _Version_Dispenser_LCM_value 0x08D0
  400. #define _Version_Dispenser_LED_value 0x08E0
  401. #define _Version_Dispenser_Connector0_value 0x08F0
  402. #define _Version_Dispenser_Connector1_value 0x0900
  403. #define _Version_Dispenser_IPAddr_value 0x0910
  404. #endif //MODULE_LCM_CTRL_H_