mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-05 10:49:42 +02:00
Added info to webserver incase challenge failed
This commit is contained in:
parent
16fc2fb4f1
commit
a2deca0f20
3 changed files with 6 additions and 1 deletions
|
@ -354,6 +354,7 @@ void update_values_battery() { /* This function maps all the values fetched via
|
|||
((solvedChallenge[7] << 24) | (solvedChallenge[6] << 16) | (solvedChallenge[5] << 8) | solvedChallenge[4]);
|
||||
datalayer_extended.nissanleaf.SolvedChallengeLSB =
|
||||
((solvedChallenge[3] << 24) | (solvedChallenge[2] << 16) | (solvedChallenge[1] << 8) | solvedChallenge[0]);
|
||||
datalayer_extended.nissanleaf.challengeFailed = challengeFailed;
|
||||
|
||||
// Update requests from webserver datalayer
|
||||
if (datalayer_extended.nissanleaf.UserRequestSOHreset) {
|
||||
|
@ -1287,7 +1288,7 @@ uint16_t Temp_fromRAW_to_F(uint16_t temperature) { //This function feels horrib
|
|||
}
|
||||
|
||||
void clearSOH(void) {
|
||||
|
||||
challengeFailed = false;
|
||||
stop_battery_query = true;
|
||||
hold_off_with_polling_10seconds = 10; // Active battery polling is paused for 100 seconds
|
||||
|
||||
|
|
|
@ -201,6 +201,9 @@ typedef struct {
|
|||
/** bool */
|
||||
/** User requesting SOH reset via WebUI*/
|
||||
bool UserRequestSOHreset = false;
|
||||
/** bool */
|
||||
/** True if the crypto challenge response from BMS is signalling a failed attempt*/
|
||||
bool challengeFailed = false;
|
||||
/** uint32_t */
|
||||
/** Cryptographic challenge to be solved */
|
||||
uint32_t CryptoChallenge = 0;
|
||||
|
|
|
@ -296,6 +296,7 @@ String advanced_battery_processor(const String& var) {
|
|||
content += "<h4>CryptoChallenge: " + String(datalayer_extended.nissanleaf.CryptoChallenge) + "</h4>";
|
||||
content += "<h4>SolvedChallenge: " + String(datalayer_extended.nissanleaf.SolvedChallengeMSB) +
|
||||
String(datalayer_extended.nissanleaf.SolvedChallengeLSB) + "</h4>";
|
||||
content += "<h4>Challenge failed: " + String(datalayer_extended.nissanleaf.challengeFailed) + "</h4>";
|
||||
#endif
|
||||
|
||||
#if !defined(TESLA_BATTERY) && !defined(NISSAN_LEAF_BATTERY) && !defined(BMW_I3_BATTERY) && \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue