mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-30 11:59:12 +03:00
Problems with unused vars fixed
This commit is contained in:
@@ -198,7 +198,7 @@ void pinChange() {
|
|||||||
//==========================================Модуль управления ШИМ===================================================
|
//==========================================Модуль управления ШИМ===================================================
|
||||||
void pwm() {
|
void pwm() {
|
||||||
|
|
||||||
static boolean flag = true;
|
//static boolean flag = true;
|
||||||
String pwm_number = sCmd.next();
|
String pwm_number = sCmd.next();
|
||||||
String pwm_pin = sCmd.next();
|
String pwm_pin = sCmd.next();
|
||||||
String widget_name = sCmd.next();
|
String widget_name = sCmd.next();
|
||||||
@@ -469,7 +469,7 @@ void servoSet() {
|
|||||||
String servo_state = sCmd.next();
|
String servo_state = sCmd.next();
|
||||||
int servo_state_int = servo_state.toInt();
|
int servo_state_int = servo_state.toInt();
|
||||||
|
|
||||||
int pin = jsonReadInt(configOptionJson, "servo_pin" + servo_number);
|
//int pin = jsonReadInt(configOptionJson, "servo_pin" + servo_number);
|
||||||
|
|
||||||
servo_state_int = map(servo_state_int,
|
servo_state_int = map(servo_state_int,
|
||||||
jsonReadInt(configOptionJson, "s_min_val" + servo_number),
|
jsonReadInt(configOptionJson, "s_min_val" + servo_number),
|
||||||
@@ -531,7 +531,7 @@ void mqttOrderSend() {
|
|||||||
//Serial.print(all_line);
|
//Serial.print(all_line);
|
||||||
//Serial.print("->");
|
//Serial.print("->");
|
||||||
//Serial.println(order);
|
//Serial.println(order);
|
||||||
int send_status = client_mqtt.publish (all_line.c_str(), order.c_str(), false);
|
client_mqtt.publish (all_line.c_str(), order.c_str(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void httpOrderSend() {
|
void httpOrderSend() {
|
||||||
|
|||||||
@@ -166,13 +166,13 @@ void sendSTATUS(String topik, String state) {
|
|||||||
topik = jsonReadStr(configSetupJson, "mqttPrefix") + "/" + chipID + "/" + topik + "/" + "status";
|
topik = jsonReadStr(configSetupJson, "mqttPrefix") + "/" + chipID + "/" + topik + "/" + "status";
|
||||||
String json_ = "{}";
|
String json_ = "{}";
|
||||||
jsonWriteStr(json_, "status", state);
|
jsonWriteStr(json_, "status", state);
|
||||||
int send_status = client_mqtt.publish (topik.c_str(), json_.c_str(), false);
|
client_mqtt.publish (topik.c_str(), json_.c_str(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//======================================CONTROL==================================================
|
//======================================CONTROL==================================================
|
||||||
void sendCONTROL(String id, String topik, String state) {
|
void sendCONTROL(String id, String topik, String state) {
|
||||||
String all_line = jsonReadStr(configSetupJson, "mqttPrefix") + "/" + id + "/" + topik + "/control";
|
String all_line = jsonReadStr(configSetupJson, "mqttPrefix") + "/" + id + "/" + topik + "/control";
|
||||||
int send_status = client_mqtt.publish (all_line.c_str(), state.c_str(), false);
|
client_mqtt.publish (all_line.c_str(), state.c_str(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//=====================================================ОТПРАВЛЯЕМ ВИДЖЕТЫ========================================================
|
//=====================================================ОТПРАВЛЯЕМ ВИДЖЕТЫ========================================================
|
||||||
|
|||||||
@@ -392,7 +392,7 @@ void dhtC_reading() {
|
|||||||
if (dht.getStatus() != 0) {
|
if (dht.getStatus() != 0) {
|
||||||
sendSTATUS("dhtComfort", String(dht.getStatusString()));
|
sendSTATUS("dhtComfort", String(dht.getStatusString()));
|
||||||
} else {
|
} else {
|
||||||
float value = dht.getComfortRatio(cf, jsonReadStr(configLiveJson, dhtT_value_name).toFloat(), jsonReadStr(configLiveJson, dhtH_value_name).toFloat(), false);
|
dht.getComfortRatio(cf, jsonReadStr(configLiveJson, dhtT_value_name).toFloat(), jsonReadStr(configLiveJson, dhtH_value_name).toFloat(), false);
|
||||||
String final_line = get_comfort_status(cf);
|
String final_line = get_comfort_status(cf);
|
||||||
jsonWriteStr(configLiveJson, "dhtComfort", final_line);
|
jsonWriteStr(configLiveJson, "dhtComfort", final_line);
|
||||||
eventGen("dhtComfort", "");
|
eventGen("dhtComfort", "");
|
||||||
@@ -486,7 +486,7 @@ void bmp280T() {
|
|||||||
|
|
||||||
void bmp280T_reading() {
|
void bmp280T_reading() {
|
||||||
float value = 0;
|
float value = 0;
|
||||||
sensors_event_t temp_event, pressure_event;
|
sensors_event_t temp_event;
|
||||||
bmp_temp->getEvent(&temp_event);
|
bmp_temp->getEvent(&temp_event);
|
||||||
value = temp_event.temperature;
|
value = temp_event.temperature;
|
||||||
jsonWriteStr(configLiveJson, bmp280T_value_name, String(value));
|
jsonWriteStr(configLiveJson, bmp280T_value_name, String(value));
|
||||||
@@ -517,7 +517,7 @@ void bmp280P() {
|
|||||||
|
|
||||||
void bmp280P_reading() {
|
void bmp280P_reading() {
|
||||||
float value = 0;
|
float value = 0;
|
||||||
sensors_event_t temp_event, pressure_event;
|
sensors_event_t pressure_event;
|
||||||
bmp_pressure->getEvent(&pressure_event);
|
bmp_pressure->getEvent(&pressure_event);
|
||||||
value = pressure_event.pressure;
|
value = pressure_event.pressure;
|
||||||
value = value / 1.333224;
|
value = value / 1.333224;
|
||||||
|
|||||||
Reference in New Issue
Block a user