Browse Source

[Improve][Modularization][Module_OcppBackend]

2021.08.18 / Folus Wen

Actions:
1. Local list version query output debug info reduce.

Files:
1. As follow commit history

Image version: D0.00.XX.XXXX.XX
Image checksum: XXXXXXXX

Hardware PWB P/N : XXXXXXX
Hardware Version : XXXXXXX
FolusWen 3 years ago
parent
commit
a4b2eb29d3

+ 1 - 1
EVSE/Modularization/ocppfiles/MessageHandler.c

@@ -635,7 +635,7 @@ void OCPP_getListVerion()
     memset(sql, 0, 100);
     memset(zErrMsg, 0, 100);
 
-    strcpy(sql, "select * from ocpp_auth_local order by idx");
+    strcpy(sql, "select * from ocpp_auth_local order by version desc, idx desc limit 1");
 
     /* Execute SQL statement */
     rc = sqlite3_exec(db, sql, versioncallback, 0, (char **)&zErrMsg);

+ 1 - 1
EVSE/Modularization/ocppph/MessageHandler.c

@@ -635,7 +635,7 @@ void OCPP_getListVerion()
     memset(sql, 0, 100);
     memset(zErrMsg, 0, 100);
 
-    strcpy(sql, "select * from ocpp_auth_local order by idx");
+    strcpy(sql, "select * from ocpp_auth_local order by version desc, idx desc limit 1");
 
     /* Execute SQL statement */
     rc = sqlite3_exec(db, sql, versioncallback, 0, (char **)&zErrMsg);