Skip to content

Commit

Permalink
Fix line break before binary operator error
Browse files Browse the repository at this point in the history
  • Loading branch information
novicatepic committed Sep 11, 2024
1 parent 507f3f4 commit ac39d70
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,11 @@ def parse_protocol_data(config, flag, protocol_data_entity, gcb_queue, client):
if protocol_data_entity.mode == "OUTPUT":
# Send data to cloud
GcbService.push_message(gcb_queue, GCB_PROTOCOL_TOPIC, payload)
if ("engine" in protocol_data_entity.name.lower()
and "temperature" in protocol_data_entity.name.lower()) and payload["value"] > 95:
customLogger.info("Temperature of " + str(payload["value"])
+ " C is too high! Sounding the alarm!")
if ("engine temperature" in protocol_data_entity.name.lower()) and payload["value"] > 95:
customLogger.info(
"Temperature of " + str(payload["value"]) + " C is too high! Sounding the alarm!")
client.publish(TEMP_ALARM_TOPIC, True, QOS)
if ("fuel" in protocol_data_entity.name.lower()
and "level" in protocol_data_entity.name.lower()) and payload["value"] < 10:
if ("fuel level" in protocol_data_entity.name.lower()) and payload["value"] < 10:
customLogger.info(
"Fuel level of " + str(payload["value"]) + " l is too low! Sounding the alarm!")
client.publish(FUEL_ALARM_TOPIC, True, QOS)
Expand Down

0 comments on commit ac39d70

Please sign in to comment.