Skip to content

Commit 4529ae1

Browse files
Merge pull request #259 from firmata/v2.5.1
Bump version to 2.5.1.
2 parents 59fb214 + d09d30d commit 4529ae1

File tree

19 files changed

+71
-40
lines changed

19 files changed

+71
-40
lines changed

Boards.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
22
Boards.h - Hardware Abstraction Layer for Firmata library
33
Copyright (c) 2006-2008 Hans-Christoph Steiner. All rights reserved.
4+
Copyright (C) 2009-2015 Jeff Hoefs. All rights reserved.
45
56
This library is free software; you can redistribute it and/or
67
modify it under the terms of the GNU Lesser General Public

Firmata.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
2-
Firmata.cpp - Firmata library v2.5.0 - 2015-11-7
2+
Firmata.cpp - Firmata library v2.5.1 - 2015-12-26
33
Copyright (c) 2006-2008 Hans-Christoph Steiner. All rights reserved.
4+
Copyright (C) 2009-2015 Jeff Hoefs. All rights reserved.
45
56
This library is free software; you can redistribute it and/or
67
modify it under the terms of the GNU Lesser General Public
@@ -87,18 +88,18 @@ void FirmataClass::begin(Stream &s)
8788
void FirmataClass::printVersion(void)
8889
{
8990
FirmataStream->write(REPORT_VERSION);
90-
FirmataStream->write(FIRMATA_MAJOR_VERSION);
91-
FirmataStream->write(FIRMATA_MINOR_VERSION);
91+
FirmataStream->write(FIRMATA_PROTOCOL_MAJOR_VERSION);
92+
FirmataStream->write(FIRMATA_PROTOCOL_MINOR_VERSION);
9293
}
9394

9495
void FirmataClass::blinkVersion(void)
9596
{
9697
#if defined(VERSION_BLINK_PIN)
9798
// flash the pin with the protocol version
9899
pinMode(VERSION_BLINK_PIN, OUTPUT);
99-
strobeBlinkPin(VERSION_BLINK_PIN, FIRMATA_MAJOR_VERSION, 40, 210);
100+
strobeBlinkPin(VERSION_BLINK_PIN, FIRMATA_FIRMWARE_MAJOR_VERSION, 40, 210);
100101
delay(250);
101-
strobeBlinkPin(VERSION_BLINK_PIN, FIRMATA_MINOR_VERSION, 40, 210);
102+
strobeBlinkPin(VERSION_BLINK_PIN, FIRMATA_FIRMWARE_MINOR_VERSION, 40, 210);
102103
delay(125);
103104
#endif
104105
}

Firmata.h

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
2-
Firmata.h - Firmata library v2.5.0 - 2015-11-7
2+
Firmata.h - Firmata library v2.5.1 - 2015-12-26
33
Copyright (c) 2006-2008 Hans-Christoph Steiner. All rights reserved.
4+
Copyright (C) 2009-2015 Jeff Hoefs. All rights reserved.
45
56
This library is free software; you can redistribute it and/or
67
modify it under the terms of the GNU Lesser General Public
@@ -16,14 +17,29 @@
1617
#include "Boards.h" /* Hardware Abstraction Layer + Wiring/Arduino */
1718

1819
/* Version numbers for the protocol. The protocol is still changing, so these
19-
* version numbers are important. This number can be queried so that host
20-
* software can test whether it will be compatible with the currently
21-
* installed firmware. */
22-
#define FIRMATA_MAJOR_VERSION 2 // for non-compatible changes
23-
#define FIRMATA_MINOR_VERSION 5 // for backwards compatible changes
24-
#define FIRMATA_BUGFIX_VERSION 0 // for bugfix releases
25-
26-
#define MAX_DATA_BYTES 64 // max number of data bytes in incoming messages
20+
* version numbers are important.
21+
* Query using the REPORT_VERSION message.
22+
*/
23+
#define FIRMATA_PROTOCOL_MAJOR_VERSION 2 // for non-compatible changes
24+
#define FIRMATA_PROTOCOL_MINOR_VERSION 5 // for backwards compatible changes
25+
#define FIRMATA_PROTOCOL_BUGFIX_VERSION 1 // for bugfix releases
26+
27+
/* Version numbers for the Firmata library.
28+
* The firmware version will not always equal the protocol version going forward.
29+
* Query using the REPORT_FIRMWARE message.
30+
*/
31+
#define FIRMATA_FIRMWARE_MAJOR_VERSION 2
32+
#define FIRMATA_FIRMWARE_MINOR_VERSION 5
33+
#define FIRMATA_FIRMWARE_BUGFIX_VERSION 1
34+
35+
/* DEPRECATED as of Firmata v2.5.1. As of 2.5.1 there are separate version numbers for
36+
* the protocol version and the firmware version.
37+
*/
38+
#define FIRMATA_MAJOR_VERSION 2 // same as FIRMATA_PROTOCOL_MAJOR_VERSION
39+
#define FIRMATA_MINOR_VERSION 5 // same as FIRMATA_PROTOCOL_MINOR_VERSION
40+
#define FIRMATA_BUGFIX_VERSION 1 // same as FIRMATA_PROTOCOL_BUGFIX_VERSION
41+
42+
#define MAX_DATA_BYTES 64 // max number of data bytes in incoming messages
2743

2844
// Arduino 101 also defines SET_PIN_MODE as a macro in scss_registers.h
2945
#ifdef SET_PIN_MODE

examples/AllInputsFirmata/AllInputsFirmata.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void setup()
4545
{
4646
byte i, port, status;
4747

48-
Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);
48+
Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);
4949

5050
for (pin = 0; pin < TOTAL_PINS; pin++) {
5151
if IS_PIN_DIGITAL(pin) pinMode(PIN_TO_DIGITAL(pin), INPUT);

examples/AnalogFirmata/AnalogFirmata.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void reportAnalogCallback(byte pin, int value)
6666
*============================================================================*/
6767
void setup()
6868
{
69-
Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);
69+
Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);
7070
Firmata.attach(ANALOG_MESSAGE, analogWriteCallback);
7171
Firmata.attach(REPORT_ANALOG, reportAnalogCallback);
7272

examples/EchoString/EchoString.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void sysexCallback(byte command, byte argc, byte *argv)
2828

2929
void setup()
3030
{
31-
Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);
31+
Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);
3232
Firmata.attach(STRING_DATA, stringCallback);
3333
Firmata.attach(START_SYSEX, sysexCallback);
3434
Firmata.begin(57600);

examples/ServoFirmata/ServoFirmata.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ void setup()
3838
{
3939
byte pin;
4040

41-
Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);
41+
Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);
4242
Firmata.attach(ANALOG_MESSAGE, analogWriteCallback);
4343
Firmata.attach(SYSTEM_RESET, systemResetCallback);
4444

examples/SimpleAnalogFirmata/SimpleAnalogFirmata.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void analogWriteCallback(byte pin, int value)
2727

2828
void setup()
2929
{
30-
Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);
30+
Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);
3131
Firmata.attach(ANALOG_MESSAGE, analogWriteCallback);
3232
Firmata.begin(57600);
3333
}

examples/SimpleDigitalFirmata/SimpleDigitalFirmata.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void digitalWriteCallback(byte port, int value)
5252

5353
void setup()
5454
{
55-
Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);
55+
Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);
5656
Firmata.attach(DIGITAL_MESSAGE, digitalWriteCallback);
5757
Firmata.attach(SET_PIN_MODE, setPinModeCallback);
5858
Firmata.begin(57600);

examples/StandardFirmata/StandardFirmata.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
2121
See file LICENSE.txt for further informations on licensing terms.
2222
23-
Last updated by Jeff Hoefs: December 20th, 2015
23+
Last updated by Jeff Hoefs: December 26th, 2015
2424
*/
2525

2626
#include <Servo.h>
@@ -725,7 +725,7 @@ void systemResetCallback()
725725

726726
void setup()
727727
{
728-
Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);
728+
Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);
729729

730730
Firmata.attach(ANALOG_MESSAGE, analogWriteCallback);
731731
Firmata.attach(DIGITAL_MESSAGE, digitalWriteCallback);

examples/StandardFirmataChipKIT/StandardFirmataChipKIT.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
2222
See file LICENSE.txt for further informations on licensing terms.
2323
24-
Last updated by Jeff Hoefs: December 20th, 2015
24+
Last updated by Jeff Hoefs: December 26th, 2015
2525
*/
2626

2727
#include <SoftPWMServo.h> // Gives us PWM and Servo on every pin
@@ -734,7 +734,7 @@ void systemResetCallback()
734734

735735
void setup()
736736
{
737-
Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);
737+
Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);
738738

739739
Firmata.attach(ANALOG_MESSAGE, analogWriteCallback);
740740
Firmata.attach(DIGITAL_MESSAGE, digitalWriteCallback);

examples/StandardFirmataEthernet/StandardFirmataEthernet.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
2121
See file LICENSE.txt for further informations on licensing terms.
2222
23-
Last updated by Jeff Hoefs: December 20th, 2015
23+
Last updated by Jeff Hoefs: December 26th, 2015
2424
*/
2525

2626
/*
@@ -857,7 +857,7 @@ void setup()
857857

858858
DEBUG_PRINTLN("connecting...");
859859

860-
Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);
860+
Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);
861861

862862
Firmata.attach(ANALOG_MESSAGE, analogWriteCallback);
863863
Firmata.attach(DIGITAL_MESSAGE, digitalWriteCallback);

examples/StandardFirmataEthernetPlus/StandardFirmataEthernetPlus.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
2121
See file LICENSE.txt for further informations on licensing terms.
2222
23-
Last updated by Jeff Hoefs: December 20th, 2015
23+
Last updated by Jeff Hoefs: December 26th, 2015
2424
*/
2525

2626
/*
@@ -1110,7 +1110,7 @@ void setup()
11101110

11111111
DEBUG_PRINTLN("connecting...");
11121112

1113-
Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);
1113+
Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);
11141114

11151115
Firmata.attach(ANALOG_MESSAGE, analogWriteCallback);
11161116
Firmata.attach(DIGITAL_MESSAGE, digitalWriteCallback);

examples/StandardFirmataPlus/StandardFirmataPlus.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
2121
See file LICENSE.txt for further informations on licensing terms.
2222
23-
Last updated by Jeff Hoefs: December 20th, 2015
23+
Last updated by Jeff Hoefs: December 26th, 2015
2424
*/
2525

2626
/*
@@ -1036,7 +1036,7 @@ void systemResetCallback()
10361036

10371037
void setup()
10381038
{
1039-
Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);
1039+
Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);
10401040

10411041
Firmata.attach(ANALOG_MESSAGE, analogWriteCallback);
10421042
Firmata.attach(DIGITAL_MESSAGE, digitalWriteCallback);

extras/revisions.txt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
1-
FIRMATA 2.5.0 0 Nov 7, 2015
1+
FIRMATA 2.5.1 - Dec 26, 2015
2+
3+
[core library]
4+
* Added support for Arduino 101
5+
* Make VERSION_BLINK_PIN optional
6+
* Separate protocol version from firmware version.
7+
Use FIRMATA_PROTOCOL_VERSION_[MAJOR/MINOR/BUGFIX] for protocol and use
8+
FIRMATA_FIRMWARE_VERSION_[MAJOR/MINOR/BUGFIX] for firmware (library version).
9+
10+
[StandardFirmata & variants]
11+
* Added ability to auto-restart I2C transmission by setting bit 6 of byte 3
12+
of the I2C_REQUEST message.
13+
14+
FIRMATA 2.5.0 - Nov 7, 2015
215

316
[core library]
417
* Added Serial feature for interfacing with serial devices via hardware

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Firmata
2-
version=2.5.0
2+
version=2.5.1
33
author=Firmata Developers
44
maintainer=https://github.com/firmata/arduino
55
sentence=Enables the communication with computer apps using a standard serial protocol. For all Arduino boards.

readme.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ $ git clone git@github.com:firmata/arduino.git ~/Documents/Arduino/libraries/Fir
8181

8282
##Updating Firmata in the Arduino IDE - older versions (<= 1.6.3 or 1.0.x)
8383

84-
Download the latest [release](https://github.com/firmata/arduino/releases/tag/v2.5.0) (for Arduino 1.0.x or Arduino 1.5.6 or higher) and replace the existing Firmata folder in your Arduino application. See the instructions below for your platform.
84+
Download the latest [release](https://github.com/firmata/arduino/releases/tag/2.5.1) (for Arduino 1.0.x or Arduino 1.5.6 or higher) and replace the existing Firmata folder in your Arduino application. See the instructions below for your platform.
8585

8686
*Note that Arduino 1.5.0 - 1.5.5 are not supported. Please use Arduino 1.5.6 or higher (or Arduino 1.0.5 or 1.0.6).*
8787

@@ -92,7 +92,7 @@ The Firmata library is contained within the Arduino package.
9292
1. Navigate to the Arduino application
9393
2. Right click on the application icon and select `Show Package Contents`
9494
3. Navigate to: `/Contents/Resources/Java/libraries/` and replace the existing
95-
`Firmata` folder with latest [Firmata release](https://github.com/firmata/arduino/releases/tag/v2.5.0) (note there is a different download
95+
`Firmata` folder with latest [Firmata release](https://github.com/firmata/arduino/releases/tag/2.5.1) (note there is a different download
9696
for Arduino 1.0.x vs 1.6.x)
9797
4. Restart the Arduino application and the latest version of Firmata will be available.
9898

@@ -102,7 +102,7 @@ will differ slightly: `Contents/Java/libraries/Firmata` (no Resources directory)
102102
###Windows:
103103

104104
1. Navigate to `c:/Program\ Files/arduino-1.x/libraries/` and replace the existing
105-
`Firmata` folder with the latest [Firmata release](https://github.com/firmata/arduino/releases/tag/v2.5.0) (note there is a different download
105+
`Firmata` folder with the latest [Firmata release](https://github.com/firmata/arduino/releases/tag/2.5.1) (note there is a different download
106106
for Arduino 1.0.x vs 1.6.x).
107107
2. Restart the Arduino application and the latest version of Firmata will be available.
108108

@@ -111,7 +111,7 @@ for Arduino 1.0.x vs 1.6.x).
111111
###Linux:
112112

113113
1. Navigate to `~/arduino-1.x/libraries/` and replace the existing
114-
`Firmata` folder with the latest [Firmata release](https://github.com/firmata/arduino/releases/tag/v2.5.0) (note there is a different download
114+
`Firmata` folder with the latest [Firmata release](https://github.com/firmata/arduino/releases/tag/2.5.1) (note there is a different download
115115
for Arduino 1.0.x vs 1.6.x).
116116
2. Restart the Arduino application and the latest version of Firmata will be available.
117117

release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ cd temp
1616
find . -name "*.DS_Store" -type f -delete
1717
zip -r Firmata.zip ./Firmata/
1818
cd ..
19-
mv ./temp/Firmata.zip Firmata-2.5.0.zip
19+
mv ./temp/Firmata.zip Firmata-2.5.1.zip
2020

2121
#package for Arduino 1.6.x
2222
cp library.properties temp/Firmata
@@ -31,5 +31,5 @@ cd ..
3131
find . -name "*.DS_Store" -type f -delete
3232
zip -r Firmata.zip ./Firmata/
3333
cd ..
34-
mv ./temp/Firmata.zip Arduino-1.6.x-Firmata-2.5.0.zip
34+
mv ./temp/Firmata.zip Arduino-1.6.x-Firmata-2.5.1.zip
3535
rm -r ./temp

test/firmata_test/firmata_test.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ test(beginPrintsVersion)
2626

2727
char expected[] = {
2828
REPORT_VERSION,
29-
FIRMATA_MAJOR_VERSION,
30-
FIRMATA_MINOR_VERSION,
29+
FIRMATA_PROTOCOL_MAJOR_VERSION,
30+
FIRMATA_PROTOCOL_MINOR_VERSION,
3131
0
3232
};
3333
assertEqual(expected, stream.bytesWritten());

0 commit comments

Comments
 (0)