Skip to content

Commit

Permalink
Tried to correct line break after binary operator error
Browse files Browse the repository at this point in the history
  • Loading branch information
novicatepic committed Sep 11, 2024
1 parent a65f667 commit 507f3f4
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,14 +284,13 @@ 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" 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!")
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" in protocol_data_entity.name.lower()
and "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 507f3f4

Please sign in to comment.