File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -349,6 +349,10 @@ void reportAnalogCallback(byte analogPin, int value)
349
349
analogInputsToReport = analogInputsToReport &~ (1 << analogPin);
350
350
} else {
351
351
analogInputsToReport = analogInputsToReport | (1 << analogPin);
352
+ // Send pin value immediately. This is helpful when connected via
353
+ // ethernet, wi-fi or bluetooth so pin states can be known upon
354
+ // reconnecting.
355
+ Firmata.sendAnalog (analogPin, analogRead (analogPin));
352
356
}
353
357
}
354
358
// TODO: save status to EEPROM here, if changed
@@ -358,6 +362,10 @@ void reportDigitalCallback(byte port, int value)
358
362
{
359
363
if (port < TOTAL_PORTS) {
360
364
reportPINs[port] = (byte)value;
365
+ // Send port value immediately. This is helpful when connected via
366
+ // ethernet, wi-fi or bluetooth so pin states can be known upon
367
+ // reconnecting.
368
+ if (value) outputPort (port, readPort (port, portConfigInputs[port]), true );
361
369
}
362
370
// do not disable analog reporting on these 8 pins, to allow some
363
371
// pins used for digital, others analog. Instead, allow both types
Original file line number Diff line number Diff line change 1
1
FIRMATA 2.4.0 BETA - not yet released
2
2
3
3
[core library]
4
- * Changed the way servo pins are mapped to enable use of servos on
5
- a wider range of pins, including analog pins.
6
- * Updated FirmataServo example to use new pin mapping technique
7
4
* Changed sendValueAsTwo7bitBytes, startSysex and endSysex from private to
8
5
public methods.
9
6
* Added Intel Galileo to Boards.h
@@ -22,6 +19,11 @@ FIRMATA 2.4.0 BETA - not yet released
22
19
* Increased input data buffer size from 32 to 64 bytes
23
20
24
21
[StandardFirmata]
22
+ * When a digital port is enabled, its value is now immediately sent to the client
23
+ * When an analog pin is enabled, its value is now immediately sent to the client
24
+ * Changed the way servo pins are mapped to enable use of servos on
25
+ a wider range of pins, including analog pins.
26
+ * Updated FirmataServo example to use new pin mapping technique
25
27
* Fixed management of unexpected sized I2C replies (Nahuel Greco)
26
28
* Fixed a bug when removing a monitored device with I2C_STOP_Reading (Nahuel Greco)
27
29
* Fixed conditional expression in I2C_STOP_READING case
You can’t perform that action at this time.
0 commit comments