-
Notifications
You must be signed in to change notification settings - Fork 0
/
changelog.txt
148 lines (113 loc) · 7.35 KB
/
changelog.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
15.11.2013
some changes regarding message counter in function:
'recv_ConfigParamReq'
'recv_ConfigSerialReq'
'recv_ConfigPeerListReq'
for answering this requests it is necassary to use the message counter from central device
check if the device is paired, otherwise no message will send from functions
'sendInfoActuatorStatus'
'sendACKStatus'
device and channel register struct implemented in function 'getMainChConfig'
list0 on device level, list1 on channel level will be loaded on start or when a register write is detected
struct to get register settings in user space is 'regMC'
usage as follows: regMC.ch1.l3.shCtDlyOn
write default values on start up to eeprom
in register.h you will find a variable 'firstLoad'. if it is defined start up will call the function
'static void mainSettings'. In this function you could define register settings and also peer settings.
uncomment firstLoad when settings are written to eeprom, otherwise settings will be written on every
reboot. you will loose a lot of free ram.
started to implement power settings for TRX module
there are mainly three power modes, initialized by 'setPowerMode(mode)'.
mode 0: RX is enabled, TX enabled (17ma)
mode 1: RX is in burst mode, TX enabled. RX will check every 250ms for a burst signal,
if no burst signal is detected, RX will switched off.
if there is a burst signal, RX will stay enabled for 1000ms
if something is transmitted, RX will stay also enabled for 1000ms for receiving an ACK
mode 2: RX is idle by default. call function 'stayAwake(time)' if you want to receive something
21.11.2013
fixed a bug in 'setListFromMsg'
address calculation was wrong, therefore every register setting was written to channel 0, list0.
Implemented a new function to act as a Switch or Remote - 'sendPeerREMOTE'
available from user space by calling the function via: hm.sendPeerREMOTE(cnl,lpr,0);
cnl is the channel from which you like to send the message, lpr 0/1 indicates if the key press was
short or long. 0 is a placeholder for battery status...
The function steps through the peer database per given channel and send the message to every peer found.
List4 per channel gets loaded from eeprom, but implemented in the function is only the peerNeedsBurst flag.
Implemented a new function 'sendPeerRAW'
Function is similar to 'sendPeerREMOTE', but you have to specify the payload by your self.
You can call the function from userspace by sendPeerRAW(cnl, type, *data, len)
cnl and type as explained already. *data indicates a byte array holding the payload and len specifies the
len of the payload in bytes.
22.11.2013
Improved function to store default settings to eeprom
In register.h there is a function 'mainSettings', within this function you can defined some default settings
on base of the register variables. e.g. 'reg.ch_0.intKeyVisib = 0;'
These default settings will be stored if a global definition of 'firstLoad' is available.
Uncomment //#define firstLoad; for enabling mainSettings. Be aware to use it only for test reasons, it will
cost memory and mor important, it will overwrite all settings at boot time.
Moved 'showHelp' function from user space to asksin.cpp, renamed to 'showPGMText'
Fixed 'reset'
No need for a reboot via the watch dog timer. Reset is done now by deleting the magic number on start of
eeprom and calling the 'initRegisters' function. Within this function there is a check for the magic number.
If this number is not found, the eeprom gets written with 0 and if done, peerdb and regMC where reloaded.
28.11.2013
Implemented a new class for button handling.
This class has to be declared in the main sketch by BK bk[x], where x are the number of instances, or how many
buttons you want to connect.
Configuration is done via void BK::configconfig(tIdx, tPin, tTimeOutShortDbl, tLongKeyTime, tTimeOutLongDdbl, tCallBack)
tIdx: is the index in interrupt handling array ( 0 - 9 possible)
tPin: is the HW Pin where the button is connected
tTimeOutShortDbl: time out between to short key press for getting a double short keypress event
tLongKeyTime: the time a button has to be pressed, until a long key event will fired
tTimeOutLongDdbl: the time to wait between to long key press to recognize as double long key press
tCallBack: a pointer where the events will pushed to.
The class delivers two information by a call back - the index you had set, and the type of event.
Events implemented:
0 - short key press
1 - double short key press
2 - long key press
3 - repeated long key press
4 - end of long key press
5 - double long key press
6 - time out to be a double long
Implemented a new class for status led handling.
The class is a member of HM and there is no need to declare in the main sketch.
To configure the led pin you have to specify the pin by 'hm.ld.config(6);' 6 is the arduino pin which holds the led.
Via 'hm.ld.set(tMode);' you can specify the led program. Following programs are at the moment possible:
0 - led off
1 - led on
2 - blink slow until 0 is set
3 - blink fast until 0 is set
4 - blink short one time, no need to set 0 to stop
5 - blink short 3 times, no need to set 0 to stop. Could be used to indicate failures
6 - something like a heart beat. short on, short off, short on, 1 second off
If you like to use this class outside of HM, you have to declare the class in the main sketch by 'LD ld'.
Then to configure the port pin by 'ld.config(pin);' and you have to put 'ld.poll();' in the main loop.
29.11.2013
Implemented a further call back from HM class to indicate configuration changes.
The function address will be provided via the jumptable in the main sketch by entering
'{ 0xFF, 0xFF, HM_Config_Changed },' this line. In this example the call back function is HM_Config_Changed which
must still exists in the main sketch.
'void HM_Config_Changed(uint8_t cnl, uint8_t *data, uint8_t len)'
There will be send no parameter to the function.
The callback is usefull in case you have to change some variables, while your sketch is working with
HM variables provided by 'regMC' struct.
01.12.2013
Reworked the button handling class. Now you could declare several instances by 'BK bk[x]', but in the main loop it
is enough to poll one instance by entering 'bk->poll();'
New function in HM framework, 'hm.setConfigEvent()'. By calling this function you will get an event in user space
for the function pointer, stored in jumplist with both FF flags. Makes it easier to configure devices which are
needing parameters from 'regMC' struct.
03.12.2013
Reworked power saving function. Power mode 3 and 4 should work now. In power mode 3 the cpu will wakeup every 8s
by the watchdog timer and will adjust the millis() counter. Be aware, this is not exact, but better then nothing.
Power mode 3 should be the mode for battery powered sensors, because a regular measurement is possible.
Power mode 4 is mainly the same as power mode 3, but without watchdog timer. Therefore it provides a maximum in
power saving. This mode should be prefered for battery powered switches.
08.12.2013
Another rework on the power saving function. Power mode 3 and 4 is now really in deep sleep and therefore the power
consumption whils sleeping is < 1 uA.
27.12.2013
- add quirks for Atmega 644
- change ports for M-LC-Sw1PBU-FM
- change interrupt handlers