Commit Graph

41 Commits

Author SHA1 Message Date
Martin Preuss
c2a6d33ff2 avr: reduced code (bootloader now 569 words). 2024-09-01 22:29:08 +02:00
Martin Preuss
3e85dc9bd5 avr: removed unused code. 2023-05-14 22:24:05 +02:00
Martin Preuss
54301fed44 avr/reed: moved notification source to REED_Run.
This make the node send the new status almost immediately after change.
2023-05-13 01:13:28 +02:00
Martin Preuss
a29a314976 minor docu fix. 2023-05-12 23:48:30 +02:00
Martin Preuss
84403d07f6 avr: added initial module to handle reed contacts.
Detects and reports opening and closing of a window/door.
Nexts step is to allow for external configuration (e.g. standard mode
with one reed contact versus multi-contact mode to detect tilting of a
window/door).
2023-05-12 21:41:39 +02:00
Martin Preuss
4a093905e8 Started working on CNY70 module (doesn't work, yet). 2023-05-02 00:03:41 +02:00
Martin Preuss
3b44fb9c5b avr: split code in multiple files and routines. 2023-04-22 11:54:09 +02:00
Martin Preuss
3e6501c834 finished basic new structure. 2023-04-22 00:23:44 +02:00
Martin Preuss
5e12b8ad4e started reorganizing code into subfolders. 2023-04-22 00:04:10 +02:00
Martin Preuss
97016b21b9 Rebooting and flashing a node now works! 2023-04-21 23:38:44 +02:00
Martin Preuss
82c7626783 flashing a device via boot loader works now!!
- use a simple rjmp to start main firmware
- add buffer size as a parameter for com2ReceivePacketRaw
- fixed bugs in
  - Flash_StartPage
  - Flash_FinishPage
  - Flash_ReadPageIntoPageBuffer
- assume irqs disabled in flash routines
- increase flash receive buffer size to 128
2023-04-20 23:57:13 +02:00
Martin Preuss
cf3a90dccc avr: moved bootloader down to 0x0d00. 2023-04-18 23:51:40 +02:00
Martin Preuss
5c111aa935 avr: add modules mask variable.
will be used by bootloader.
2023-04-18 23:46:38 +02:00
Martin Preuss
5f4260d605 avr: moved COM and COMPROTO defs and routines into dedicated files. 2023-04-16 23:23:06 +02:00
Martin Preuss
c00b90bf28 more work on switching to new COM and TIMER stack. 2023-04-13 21:16:51 +02:00
Martin Preuss
a61226c3d9 avr: some more cleanup. 2023-04-12 23:40:30 +02:00
Martin Preuss
86b45a58e5 avr: decreased verbosity. minor fixes.
- address claiming modes now work
2023-04-12 23:32:08 +02:00
Martin Preuss
ded08b8c47 avr: new com2 and timer stack basically works again. 2023-04-12 21:46:34 +02:00
Martin Preuss
024d40fc95 avr: started reworking COM module.
- sending and receiving now basically works again, but too often the
  read buffer is in use when trying to receive a message.
2023-04-12 15:30:52 +02:00
Martin Preuss
eca6fc6efc avr: try calculating idle times. 2023-04-10 23:33:24 +02:00
Martin Preuss
6c8f8e19b2 avr: cleanup. 2023-04-10 01:41:21 +02:00
Martin Preuss
84f11398b8 avr: reworked timer code.
Allow for more tailored timers.
2023-04-10 01:00:58 +02:00
Martin Preuss
0600a2d9ab avr: added memstat message. 2023-04-09 18:49:50 +02:00
Martin Preuss
7490167694 avr: cleanup, added labels to calculate module sizes. 2023-04-08 18:18:19 +02:00
Martin Preuss
56c11b959e avr: add copyright notices. 2023-04-08 13:05:05 +02:00
Martin Preuss
e673a88cf3 avr: added timer entry for every5s
This will be used for the window check module.
2023-04-08 03:09:12 +02:00
Martin Preuss
398f675022 avr: improved timer module.
- simplified timer handling. still using cascading counters but in an
  extendable way
- added onEvery5m while on it
- renamed everyMinute to every1m (unifies routine names)
- send network stats every 5m, not every minute
2023-04-08 02:23:34 +02:00
Martin Preuss
090122a192 reworked com stack.
- prepared for use of CRC8
- organized code in more files
- recv stats message now contains crc errors and io errors
2023-04-07 19:14:05 +02:00
Martin Preuss
e07e3f2b8a some formatting. 2023-03-28 21:45:16 +02:00
Martin Preuss
c41d6fa45a avr: added code and messages for device information.
- send firmware information in DEVICE message
- introduced new version of VALUE message (sending UID now instead of
  timestamp)
- make SENDSTATS and RECVSTATS messages also send UID instead of timestamp
2023-03-19 23:20:16 +01:00
Martin Preuss
ccb642d703 avr: setup module mask to be later reported to a host. 2023-03-19 13:24:21 +01:00
Martin Preuss
67ac8af9b4 Shortened blink pattern. 2023-03-19 12:43:52 +01:00
Martin Preuss
8119cba750 avr: started working on base system vs. main system.
base system will be a base system which can be used to flash and start
the main system.
2023-02-20 23:47:30 +01:00
Martin Preuss
a764cc60cb Removed code no longer needed. 2023-02-06 21:55:36 +01:00
Martin Preuss
2ce2aa03c8 Always use new shortened address assignment protocol if possible. 2023-02-06 21:11:24 +01:00
Martin Preuss
0b1e0ea4d5 Implemented address assignment protocol. 2023-02-05 23:43:16 +01:00
Martin Preuss
2956637605 Moved routine sendValueMsg to Main_SendValueMsg in main.asm. Removed debug code. 2023-02-05 15:38:32 +01:00
Martin Preuss
f58f301423 Call UID generator (if necessary). 2023-02-04 16:02:18 +01:00
Martin Preuss
5b15b5ef9f Moved protocol stuff into comproto.asm. 2023-02-04 00:56:29 +01:00
Martin Preuss
2f4fbf8598 main: Fixed a bug.
Need to save R22 if you use it..
2023-02-02 00:54:44 +01:00
Martin Preuss
0c87d3fc4d build: Reorganized code.
Most MCU-dependent variable definitions ist now put into node-specific files.
Makes it easier to maintain code for different node types.
2023-02-02 00:44:50 +01:00