MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / press

Method press

ArduSub/script_button.cpp:8–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#include "script_button.h"
7
8void ScriptButton::press()
9{
10 if (!pressed) {
11 pressed = true;
12
13 // The count will max out at 255, but it won't roll over to 0.
14 if (count < std::numeric_limits<uint8_t>::max()) {
15 count++;
16 }
17 }
18}
19
20void ScriptButton::release()
21{

Callers 1

handle_jsbutton_pressMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected