Skip to content

Commit 641e25c

Browse files
use isResetting method in StandardFirmata
1 parent 4eefd63 commit 641e25c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

examples/StandardFirmata/StandardFirmata.ino

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ struct i2c_device_info {
7777
/* for i2c read continuous more */
7878
i2c_device_info query[MAX_QUERIES];
7979

80-
boolean isResetting = false;
81-
8280
byte i2cRxData[32];
8381
boolean isI2CEnabled = false;
8482
signed char queryIndex = -1;
@@ -353,7 +351,7 @@ void reportAnalogCallback(byte analogPin, int value)
353351
analogInputsToReport = analogInputsToReport | (1 << analogPin);
354352
// prevent during system reset or all analog pin values will be reported
355353
// which may report noise for unconnected analog pins
356-
if (!isResetting) {
354+
if (!Firmata.isResetting()) {
357355
// Send pin value immediately. This is helpful when connected via
358356
// ethernet, wi-fi or bluetooth so pin states can be known upon
359357
// reconnecting.
@@ -616,7 +614,6 @@ void disableI2CPins() {
616614

617615
void systemResetCallback()
618616
{
619-
isResetting = true;
620617
// initialize a defalt state
621618
// TODO: option to load config from EEPROM instead of default
622619
if (isI2CEnabled) {
@@ -657,7 +654,6 @@ void systemResetCallback()
657654
outputPort(i, readPort(i, portConfigInputs[i]), true);
658655
}
659656
*/
660-
isResetting = false;
661657
}
662658

663659
void setup()

0 commit comments

Comments
 (0)