Skip to content

Commit 4b25d57

Browse files
committed
v1.5.5 FIX CONFIRM_FLAG 0x80
1 parent 1b850c4 commit 4b25d57

4 files changed

Lines changed: 14 additions & 5 deletions

File tree

HISTORY.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [1.5.5] - 2016-05-05
2+
3+
### Fix
4+
5+
- if SERIAL_NUMBER_ADDRESS equal CONFIRM_FLAG 0x80, then Serial Number exist in EEPROM
6+
17
## [1.5.4] - 2016-05-02
28

39
### Fix

library.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name=uArmLibrary
2-
version=1.5.3
2+
version=1.5.5
33
author=UFactory <developer@ufactory.cc>
44
maintainer=Joey Song <joey@ufactory.cc>, Alex Tan<alex@ufactory.cc>
55
sentence=uArm Library for Arduino
66
paragraph=
7-
url=http://ufactory.cc
7+
url=http://developer.ufactory.cc
88
category=Device Control
99
architectures=avr

uarm_library.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ uArmClass::uArmClass()
2121
* SERIAL NUMBER ADDRESS : 1024, Size: 14
2222
*/
2323
void uArmClass::readSerialNumber(byte (&byte_sn_array)[14]){
24-
if (EEPROM.read(SERIAL_NUMBER_ADDRESS) == SERIAL_NUMBER_ADDRESS){
24+
if (EEPROM.read(SERIAL_NUMBER_ADDRESS) == CONFIRM_FLAG){
2525
for(byte i=0; i<14; i++){
2626
byte_sn_array[i] = EEPROM.read(SERIAL_NUMBER_ADDRESS+i+1);
2727
}
@@ -35,7 +35,7 @@ void uArmClass::writeSerialNumber(byte (&byte_sn_array)[14]){
3535
for(byte i=0; i<14; i++){
3636
EEPROM.write(SERIAL_NUMBER_ADDRESS+i+1, byte_sn_array[i]);
3737
}
38-
EEPROM.write(SERIAL_NUMBER_ADDRESS, SERIAL_NUMBER_ADDRESS);
38+
EEPROM.write(SERIAL_NUMBER_ADDRESS, CONFIRM_FLAG);
3939
}
4040

4141
/* Use BUZZER for Alert

uarm_library.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
#define UARM_MAJOR_VERSION 1
2424
#define UARM_MINOR_VERSION 5
25-
#define UARM_BUGFIX 4
25+
#define UARM_BUGFIX 5
2626

2727
#define SERVO_ROT_NUM 0
2828
#define SERVO_LEFT_NUM 1
@@ -87,6 +87,9 @@
8787
#define OFFSET_STRETCH_START_ADDRESS 20
8888
#define SERIAL_NUMBER_ADDRESS 1024
8989

90+
#define CONFIRM_FLAG 0x80
91+
92+
9093

9194

9295
// movement path types

0 commit comments

Comments
 (0)