Add Command CalcRes

This commit is contained in:
Adrian Scillato 2018-11-26 23:08:23 -03:00 committed by GitHub
parent e46a81c193
commit e3d1971e51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -595,8 +595,8 @@ boolean RulesCommand(void)
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_INDEX_SVALUE, command, index, Settings.mems[index -1]); snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_INDEX_SVALUE, command, index, Settings.mems[index -1]);
} }
else if (CMND_CALC_RESOLUTION == command_code) { else if (CMND_CALC_RESOLUTION == command_code) {
if ((payload >= 0) && (payload <= 7)) { if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= 7)) {
Settings.flag2.calc_resolution = payload; Settings.flag2.calc_resolution = XdrvMailbox.payload;
} }
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_NVALUE, command, Settings.flag2.calc_resolution); snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_NVALUE, command, Settings.flag2.calc_resolution);
} }