arduino_handler.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:openag_brain 作者: OpenAgInitiative 项目源码 文件源码
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.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号