Skip to content

Commit

Permalink
Merge pull request #259 from firmata/v2.5.1
Browse files Browse the repository at this point in the history
Bump version to 2.5.1.
  • Loading branch information
soundanalogous committed Dec 26, 2015
2 parents 59fb214 + d09d30d commit 4529ae1
Show file tree
Hide file tree
Showing 19 changed files with 71 additions and 40 deletions.
1 change: 1 addition & 0 deletions Boards.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
Boards.h - Hardware Abstraction Layer for Firmata library
Copyright (c) 2006-2008 Hans-Christoph Steiner. All rights reserved.
Copyright (C) 2009-2015 Jeff Hoefs. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
Expand Down
11 changes: 6 additions & 5 deletions Firmata.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
Firmata.cpp - Firmata library v2.5.0 - 2015-11-7
Firmata.cpp - Firmata library v2.5.1 - 2015-12-26
Copyright (c) 2006-2008 Hans-Christoph Steiner. All rights reserved.
Copyright (C) 2009-2015 Jeff Hoefs. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -87,18 +88,18 @@ void FirmataClass::begin(Stream &s)
void FirmataClass::printVersion(void)
{
FirmataStream->write(REPORT_VERSION);
FirmataStream->write(FIRMATA_MAJOR_VERSION);
FirmataStream->write(FIRMATA_MINOR_VERSION);
FirmataStream->write(FIRMATA_PROTOCOL_MAJOR_VERSION);
FirmataStream->write(FIRMATA_PROTOCOL_MINOR_VERSION);
}

void FirmataClass::blinkVersion(void)
{
#if defined(VERSION_BLINK_PIN)
// flash the pin with the protocol version
pinMode(VERSION_BLINK_PIN, OUTPUT);
strobeBlinkPin(VERSION_BLINK_PIN, FIRMATA_MAJOR_VERSION, 40, 210);
strobeBlinkPin(VERSION_BLINK_PIN, FIRMATA_FIRMWARE_MAJOR_VERSION, 40, 210);
delay(250);
strobeBlinkPin(VERSION_BLINK_PIN, FIRMATA_MINOR_VERSION, 40, 210);
strobeBlinkPin(VERSION_BLINK_PIN, FIRMATA_FIRMWARE_MINOR_VERSION, 40, 210);
delay(125);
#endif
}
Expand Down
34 changes: 25 additions & 9 deletions Firmata.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
Firmata.h - Firmata library v2.5.0 - 2015-11-7
Firmata.h - Firmata library v2.5.1 - 2015-12-26
Copyright (c) 2006-2008 Hans-Christoph Steiner. All rights reserved.
Copyright (C) 2009-2015 Jeff Hoefs. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
Expand All @@ -16,14 +17,29 @@
#include "Boards.h" /* Hardware Abstraction Layer + Wiring/Arduino */

/* Version numbers for the protocol. The protocol is still changing, so these
* version numbers are important. This number can be queried so that host
* software can test whether it will be compatible with the currently
* installed firmware. */
#define FIRMATA_MAJOR_VERSION 2 // for non-compatible changes
#define FIRMATA_MINOR_VERSION 5 // for backwards compatible changes
#define FIRMATA_BUGFIX_VERSION 0 // for bugfix releases

#define MAX_DATA_BYTES 64 // max number of data bytes in incoming messages
* version numbers are important.
* Query using the REPORT_VERSION message.
*/
#define FIRMATA_PROTOCOL_MAJOR_VERSION 2 // for non-compatible changes
#define FIRMATA_PROTOCOL_MINOR_VERSION 5 // for backwards compatible changes
#define FIRMATA_PROTOCOL_BUGFIX_VERSION 1 // for bugfix releases

/* Version numbers for the Firmata library.
* The firmware version will not always equal the protocol version going forward.
* Query using the REPORT_FIRMWARE message.
*/
#define FIRMATA_FIRMWARE_MAJOR_VERSION 2
#define FIRMATA_FIRMWARE_MINOR_VERSION 5
#define FIRMATA_FIRMWARE_BUGFIX_VERSION 1

/* DEPRECATED as of Firmata v2.5.1. As of 2.5.1 there are separate version numbers for
* the protocol version and the firmware version.
*/
#define FIRMATA_MAJOR_VERSION 2 // same as FIRMATA_PROTOCOL_MAJOR_VERSION
#define FIRMATA_MINOR_VERSION 5 // same as FIRMATA_PROTOCOL_MINOR_VERSION
#define FIRMATA_BUGFIX_VERSION 1 // same as FIRMATA_PROTOCOL_BUGFIX_VERSION

#define MAX_DATA_BYTES 64 // max number of data bytes in incoming messages

// Arduino 101 also defines SET_PIN_MODE as a macro in scss_registers.h
#ifdef SET_PIN_MODE
Expand Down
2 changes: 1 addition & 1 deletion examples/AllInputsFirmata/AllInputsFirmata.ino
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void setup()
{
byte i, port, status;

Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);
Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);

for (pin = 0; pin < TOTAL_PINS; pin++) {
if IS_PIN_DIGITAL(pin) pinMode(PIN_TO_DIGITAL(pin), INPUT);
Expand Down
2 changes: 1 addition & 1 deletion examples/AnalogFirmata/AnalogFirmata.ino
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void reportAnalogCallback(byte pin, int value)
*============================================================================*/
void setup()
{
Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);
Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);
Firmata.attach(ANALOG_MESSAGE, analogWriteCallback);
Firmata.attach(REPORT_ANALOG, reportAnalogCallback);

Expand Down
2 changes: 1 addition & 1 deletion examples/EchoString/EchoString.ino
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void sysexCallback(byte command, byte argc, byte *argv)

void setup()
{
Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);
Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);
Firmata.attach(STRING_DATA, stringCallback);
Firmata.attach(START_SYSEX, sysexCallback);
Firmata.begin(57600);
Expand Down
2 changes: 1 addition & 1 deletion examples/ServoFirmata/ServoFirmata.ino
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void setup()
{
byte pin;

Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);
Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);
Firmata.attach(ANALOG_MESSAGE, analogWriteCallback);
Firmata.attach(SYSTEM_RESET, systemResetCallback);

Expand Down
2 changes: 1 addition & 1 deletion examples/SimpleAnalogFirmata/SimpleAnalogFirmata.ino
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void analogWriteCallback(byte pin, int value)

void setup()
{
Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);
Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);
Firmata.attach(ANALOG_MESSAGE, analogWriteCallback);
Firmata.begin(57600);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/SimpleDigitalFirmata/SimpleDigitalFirmata.ino
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void digitalWriteCallback(byte port, int value)

void setup()
{
Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);
Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);
Firmata.attach(DIGITAL_MESSAGE, digitalWriteCallback);
Firmata.attach(SET_PIN_MODE, setPinModeCallback);
Firmata.begin(57600);
Expand Down
4 changes: 2 additions & 2 deletions examples/StandardFirmata/StandardFirmata.ino
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
See file LICENSE.txt for further informations on licensing terms.
Last updated by Jeff Hoefs: December 20th, 2015
Last updated by Jeff Hoefs: December 26th, 2015
*/

#include <Servo.h>
Expand Down Expand Up @@ -725,7 +725,7 @@ void systemResetCallback()

void setup()
{
Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);
Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);

Firmata.attach(ANALOG_MESSAGE, analogWriteCallback);
Firmata.attach(DIGITAL_MESSAGE, digitalWriteCallback);
Expand Down
4 changes: 2 additions & 2 deletions examples/StandardFirmataChipKIT/StandardFirmataChipKIT.ino
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
See file LICENSE.txt for further informations on licensing terms.
Last updated by Jeff Hoefs: December 20th, 2015
Last updated by Jeff Hoefs: December 26th, 2015
*/

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

void setup()
{
Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);
Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);

Firmata.attach(ANALOG_MESSAGE, analogWriteCallback);
Firmata.attach(DIGITAL_MESSAGE, digitalWriteCallback);
Expand Down
4 changes: 2 additions & 2 deletions examples/StandardFirmataEthernet/StandardFirmataEthernet.ino
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
See file LICENSE.txt for further informations on licensing terms.
Last updated by Jeff Hoefs: December 20th, 2015
Last updated by Jeff Hoefs: December 26th, 2015
*/

/*
Expand Down Expand Up @@ -857,7 +857,7 @@ void setup()

DEBUG_PRINTLN("connecting...");

Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);
Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);

Firmata.attach(ANALOG_MESSAGE, analogWriteCallback);
Firmata.attach(DIGITAL_MESSAGE, digitalWriteCallback);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
See file LICENSE.txt for further informations on licensing terms.
Last updated by Jeff Hoefs: December 20th, 2015
Last updated by Jeff Hoefs: December 26th, 2015
*/

/*
Expand Down Expand Up @@ -1110,7 +1110,7 @@ void setup()

DEBUG_PRINTLN("connecting...");

Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);
Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);

Firmata.attach(ANALOG_MESSAGE, analogWriteCallback);
Firmata.attach(DIGITAL_MESSAGE, digitalWriteCallback);
Expand Down
4 changes: 2 additions & 2 deletions examples/StandardFirmataPlus/StandardFirmataPlus.ino
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
See file LICENSE.txt for further informations on licensing terms.
Last updated by Jeff Hoefs: December 20th, 2015
Last updated by Jeff Hoefs: December 26th, 2015
*/

/*
Expand Down Expand Up @@ -1036,7 +1036,7 @@ void systemResetCallback()

void setup()
{
Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);
Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);

Firmata.attach(ANALOG_MESSAGE, analogWriteCallback);
Firmata.attach(DIGITAL_MESSAGE, digitalWriteCallback);
Expand Down
15 changes: 14 additions & 1 deletion extras/revisions.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
FIRMATA 2.5.0 0 Nov 7, 2015
FIRMATA 2.5.1 - Dec 26, 2015

[core library]
* Added support for Arduino 101
* Make VERSION_BLINK_PIN optional
* Separate protocol version from firmware version.
Use FIRMATA_PROTOCOL_VERSION_[MAJOR/MINOR/BUGFIX] for protocol and use
FIRMATA_FIRMWARE_VERSION_[MAJOR/MINOR/BUGFIX] for firmware (library version).

[StandardFirmata & variants]
* Added ability to auto-restart I2C transmission by setting bit 6 of byte 3
of the I2C_REQUEST message.

FIRMATA 2.5.0 - Nov 7, 2015

[core library]
* Added Serial feature for interfacing with serial devices via hardware
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Firmata
version=2.5.0
version=2.5.1
author=Firmata Developers
maintainer=https://github.com/firmata/arduino
sentence=Enables the communication with computer apps using a standard serial protocol. For all Arduino boards.
Expand Down
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ $ git clone git@github.com:firmata/arduino.git ~/Documents/Arduino/libraries/Fir

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

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.
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.

*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).*

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

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

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

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

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

Expand Down
4 changes: 2 additions & 2 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cd temp
find . -name "*.DS_Store" -type f -delete
zip -r Firmata.zip ./Firmata/
cd ..
mv ./temp/Firmata.zip Firmata-2.5.0.zip
mv ./temp/Firmata.zip Firmata-2.5.1.zip

#package for Arduino 1.6.x
cp library.properties temp/Firmata
Expand All @@ -31,5 +31,5 @@ cd ..
find . -name "*.DS_Store" -type f -delete
zip -r Firmata.zip ./Firmata/
cd ..
mv ./temp/Firmata.zip Arduino-1.6.x-Firmata-2.5.0.zip
mv ./temp/Firmata.zip Arduino-1.6.x-Firmata-2.5.1.zip
rm -r ./temp
4 changes: 2 additions & 2 deletions test/firmata_test/firmata_test.ino
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ test(beginPrintsVersion)

char expected[] = {
REPORT_VERSION,
FIRMATA_MAJOR_VERSION,
FIRMATA_MINOR_VERSION,
FIRMATA_PROTOCOL_MAJOR_VERSION,
FIRMATA_PROTOCOL_MINOR_VERSION,
0
};
assertEqual(expected, stream.bytesWritten());
Expand Down

0 comments on commit 4529ae1

Please sign in to comment.