comment unused PZEM non-measurements

This commit is contained in:
King Kévin 2016-10-14 10:45:58 +02:00
parent 520e5fac16
commit cf44707281
2 changed files with 4 additions and 2 deletions

View File

@ -133,9 +133,11 @@ struct sensor_pzem_measurement_t sensor_pzem_measurement_decode(void)
case SENSOR_PZEM_ENERGY:
measurement.value.energy = ((uint32_t)rx_buffer[1]<<16)+((uint16_t)rx_buffer[2]<<8)+rx_buffer[3];
break;
/* not used in this application
case SENSOR_PZEM_ADDRESS:
case SENSOR_PZEM_ALARM:
break; // no value is returned
*/
default:
measurement.valid = false; // unexpected type
}

View File

@ -29,8 +29,8 @@ enum sensor_pzem_measurement_type_t {
SENSOR_PZEM_CURRENT = 1,
SENSOR_PZEM_POWER = 2,
SENSOR_PZEM_ENERGY = 3,
SENSOR_PZEM_ADDRESS = 4,
SENSOR_PZEM_ALARM = 5,
// SENSOR_PZEM_ADDRESS = 4, // this is a setting, not a measurement
// SENSOR_PZEM_ALARM = 5, // this is a setting, not a measurement
SENSOR_PZEM_MAX
};