StateMachine:处理Arduino项目的状态和转换

时间:2021-02-13 06:40:44
【文件属性】:
文件名称:StateMachine:处理Arduino项目的状态和转换
文件大小:5KB
文件格式:ZIP
更新时间:2021-02-13 06:40:44
C++ 处理Arduino项目的状态和转换。 图书馆 帮助定义应用程序的相关状态 通过注册调用进入,保持和退出特定状态的方法,允许组织与特定状态相关的代码 可以注册超时处理程序以限制给定状态下的时间 在串行上发出状态转换调试消息 将状态转换的决定留给已注册的处理程序(对可能的转换没有任何限制) 编码示例 定义 typedef enum {PARK, START, MOVING, STOPPED, CHANGE } States; const char* stateNames[] = {"Park", "Start", "Moving", "Stopped", "Change"}; StateMachine state(5, stateNames, millis); 枚举定义States稍后用于识别的状态。 state机将以许多可能的状态启动。 sta
【文件预览】:
StateMachine-master
----src()
--------StateMachine.h(4KB)
----arduino-cli.yaml(39B)
----examples()
--------Platform()
----README.md(2KB)
----.gitignore(52B)

网友评论