Skip to content

Commit 21cf253

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 668a5f6 + 3fed88a commit 21cf253

File tree

112 files changed

+12826
-2856
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+12826
-2856
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
stino.settings
12
*~
2-
*bak
3+
*bak

Bootloader/MyOtaBootloader.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ static uint8_t sendAndWait(uint8_t reqType, uint8_t resType) {
5656
msg.type = reqType;
5757
for (uint8_t i = 0; i < 10; i++) {
5858
sendWrite(msg);
59-
for (uint16_t j = 0; j < 20; j++) {
59+
for (uint8_t j = 0; j < 20; j++) {
6060
wdt_reset();
61-
for (uint16_t j = 0; j < 100; j++) {
61+
for (uint8_t j = 0; j < 100; j++) {
6262
wdt_reset();
6363
uint8_t pipe;
6464
boolean avail = available(&pipe);
@@ -152,6 +152,12 @@ int main () {
152152
address(nc.nodeId);
153153
}
154154

155+
// Inform gateway that bootloader does not accept signed messages
156+
msg.type = I_REQUEST_SIGNING;
157+
mSetLength(msg, 1);
158+
msg.data[0] = 0;
159+
sendWrite(msg);
160+
155161
// Read settings from EEPROM
156162
eeprom_read_block((void*)&fc, (void*)EEPROM_FIRMWARE_TYPE_ADDRESS, sizeof(struct FirmwareConfig));
157163

Bootloader/MyOtaBootloader.hex

Lines changed: 200 additions & 204 deletions
Large diffs are not rendered by default.

Bootloader/MyOtaBootloaderHW.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ static void delayu() {
3232
asm("nop");
3333
}
3434

35-
static void delaym(uint16_t t) {
36-
uint16_t d, a;
35+
static void delaym(uint8_t t) {
36+
uint8_t d;
37+
uint16_t a;
3738
for (d = 0; d < t; d++)
3839
for (a = 0; a < DELAY_M; a++)
3940
asm("nop");

NodeJsController/NodeJsController.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,5 +706,8 @@ dbc.connect('mongodb://' + dbAddress + ':' + dbPort + '/' + dbName, function(err
706706
} else {
707707
throw new Error('unknown Gateway type');
708708
}
709+
setInterval(function() {
710+
sendTime(BROADCAST_ADDRESS, NODE_SENSOR_ID, gw);
711+
}, 5*60*1000);
709712
});
710713

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Arduino
22
=======
33

4-
MySensors Arduino Library v1.4
4+
MySensors Arduino Library v1.5
55

66
Please visit www.mysensors.org for more information

hardware/MySensors/avr/boards.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ MysensorsMicro.bootloader.unlock_bits=0x3F
1616
MysensorsMicro.bootloader.lock_bits=0x0F
1717
MysensorsMicro.bootloader.low_fuses=0xE2
1818
MysensorsMicro.bootloader.high_fuses=0xD2
19-
MysensorsMicro.bootloader.extended_fuses=0xFE
19+
MysensorsMicro.bootloader.extended_fuses=0x06
2020
MysensorsMicro.bootloader.file=DualOptiboot/optiboot_atmega328_pro_8MHz.hex
2121

2222
MysensorsMicro.build.board=AVR_MICRO8

libraries/LiquidCrystal/LCD.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ void LCD::createChar(uint8_t location, uint8_t charmap[])
304304
}
305305

306306
#ifdef __AVR__
307-
void LCD::createChar(uint8_t location, const unsigned char charmap[])
307+
void LCD::createChar(uint8_t location, const unsigned char charmap[])
308308
{
309309
location &= 0x7; // we only have 8 memory locations 0-7
310310

libraries/LiquidCrystal/LCD.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ class LCD : public Print
418418
(0 to 7)
419419
@param charmap[in] the bitmap array representing each row of the character.
420420
*/
421-
void createChar(uint8_t location, const unsigned char charmap[]);
421+
void createChar(uint8_t location, const unsigned char charmap[]);
422422
#endif // __AVR__
423423

424424
/*!

libraries/MySensors/utility/MsTimer2.cpp renamed to libraries/MsTimer2/MsTimer2.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
Javier Valencia <[email protected]>
44
55
History:
6+
7+
05Apr2015 TRL V0.6a added support for ATmega1284P
68
29/Dec/11 - V0.6 added support for ATmega32u4, AT90USB646, AT90USB1286 ([email protected])
79
some improvements added by Bill Perry
810
note: uses timer4 on Atmega32u4
@@ -49,7 +51,7 @@ void MsTimer2::set(unsigned long ms, void (*f)()) {
4951

5052
func = f;
5153

52-
#if defined (__AVR_ATmega168__) || defined (__AVR_ATmega48__) || defined (__AVR_ATmega88__) || defined (__AVR_ATmega328P__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
54+
#if defined (__AVR_ATmega168__) || defined (__AVR_ATmega48__) || defined (__AVR_ATmega88__) || defined (__AVR_ATmega328P__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega2560__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
5355
TIMSK2 &= ~(1<<TOIE2);
5456
TCCR2A &= ~((1<<WGM21) | (1<<WGM20));
5557
TCCR2B &= ~(1<<WGM22);
@@ -147,7 +149,7 @@ void MsTimer2::set(unsigned long ms, void (*f)()) {
147149
void MsTimer2::start() {
148150
count = 0;
149151
overflowing = 0;
150-
#if defined (__AVR_ATmega168__) || defined (__AVR_ATmega48__) || defined (__AVR_ATmega88__) || defined (__AVR_ATmega328P__) || defined (__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
152+
#if defined (__AVR_ATmega168__) || defined (__AVR_ATmega48__) || defined (__AVR_ATmega88__) || defined (__AVR_ATmega328P__) || defined (__AVR_ATmega1280__) || defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega2560__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
151153
TCNT2 = tcnt2;
152154
TIMSK2 |= (1<<TOIE2);
153155
#elif defined (__AVR_ATmega128__)
@@ -164,7 +166,7 @@ void MsTimer2::start() {
164166
}
165167

166168
void MsTimer2::stop() {
167-
#if defined (__AVR_ATmega168__) || defined (__AVR_ATmega48__) || defined (__AVR_ATmega88__) || defined (__AVR_ATmega328P__) || defined (__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
169+
#if defined (__AVR_ATmega168__) || defined (__AVR_ATmega48__) || defined (__AVR_ATmega88__) || defined (__AVR_ATmega328P__) || defined (__AVR_ATmega1280__) || defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega2560__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
168170
TIMSK2 &= ~(1<<TOIE2);
169171
#elif defined (__AVR_ATmega128__)
170172
TIMSK &= ~(1<<TOIE2);
@@ -192,7 +194,7 @@ ISR(TIMER4_OVF_vect) {
192194
#else
193195
ISR(TIMER2_OVF_vect) {
194196
#endif
195-
#if defined (__AVR_ATmega168__) || defined (__AVR_ATmega48__) || defined (__AVR_ATmega88__) || defined (__AVR_ATmega328P__) || defined (__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
197+
#if defined (__AVR_ATmega168__) || defined (__AVR_ATmega48__) || defined (__AVR_ATmega88__) || defined (__AVR_ATmega328P__) || defined (__AVR_ATmega1280__) || defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega2560__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
196198
TCNT2 = MsTimer2::tcnt2;
197199
#elif defined (__AVR_ATmega128__)
198200
TCNT2 = MsTimer2::tcnt2;
@@ -203,4 +205,3 @@ ISR(TIMER2_OVF_vect) {
203205
#endif
204206
MsTimer2::_overflow();
205207
}
206-

0 commit comments

Comments
 (0)