fixes for SM10 detection

This commit is contained in:
proddy
2019-03-20 12:30:55 +01:00
parent 159a36e7de
commit f7575bf648
2 changed files with 4 additions and 3 deletions

View File

@@ -1236,7 +1236,7 @@ void _process_Version(uint8_t type, uint8_t * data, uint8_t length) {
return; return;
} }
// finally look for the other devices // finally look for the other EMS devices
i = 0; i = 0;
while (i < _Other_Types_max) { while (i < _Other_Types_max) {
if (Other_Types[i].product_id == product_id) { if (Other_Types[i].product_id == product_id) {
@@ -1253,9 +1253,10 @@ void _process_Version(uint8_t type, uint8_t * data, uint8_t length) {
product_id, product_id,
version); version);
// see if this is a Solar Module SM10 // TODO: tidy up // see if this is a Solar Module SM10
if (Other_Types[i].type_id == EMS_ID_SM10) { if (Other_Types[i].type_id == EMS_ID_SM10) {
EMS_Other.SM10 = true; // we have detected a SM10 EMS_Other.SM10 = true; // we have detected a SM10
myDebug("SM10 Solar Module support enabled.");
} }
return; return;

View File

@@ -137,7 +137,7 @@ const _Other_Type Other_Types[] = {
{EMS_MODEL_OTHER, 114, 0x09, "BC10 Base Controller"}, {EMS_MODEL_OTHER, 114, 0x09, "BC10 Base Controller"},
{EMS_MODEL_OTHER, 125, 0x09, "BC25 Base Controller"}, {EMS_MODEL_OTHER, 125, 0x09, "BC25 Base Controller"},
{EMS_MODEL_OTHER, 205, 0x02, "Nefit Moduline Easy Connect"}, {EMS_MODEL_OTHER, 205, 0x02, "Nefit Moduline Easy Connect"},
{EMS_MODEL_OTHER, 73, 0x02, "SM10 Solar Module"} {EMS_MODEL_OTHER, 73, EMS_ID_SM10, "SM10 Solar Module"}
}; };