def water_potential_hydrogen_callback(msg): # float -1 ~ 1
command = msg.data
# reset state to idle
actuator_state["pump_3_ph_up_1"] = False
actuator_state["pump_4_ph_down_1"] = False
# Set actuator_state based on command
if command > 0:
actuator_state["pump_3_ph_up_1"] = True
elif command < 0:
actuator_state["pump_4_ph_down_1"] = True
# nutrient_flora_duo_a is a "Rate" of dosage, so we can just change the dosage
# without resetting to "idle state" since that doesn't exist.
评论列表
文章目录