Commit Graph

74 Commits

Author SHA1 Message Date
Martin Preuss
3485449e00 avr: moved code outside of ifdef/endif pair (fixes a bug). 2023-03-19 23:22:08 +01:00
Martin Preuss
e5c06c7640 avr: increased number of COM buffers from 4 to 6. 2023-03-19 23:21:40 +01: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
a1f700efc1 avr: add an initial wait time before starting the node.
This allows for desyncing of nodes to reduce COM collisions.
2023-03-19 13:26:03 +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
f450ab3e67 COM: Check for collisions after half a bit length.
Especially with longer cables we need to give the line some time to safely
raise the signal to high.
2023-03-19 12:43:33 +01:00
Martin Preuss
8c00c94d9c Improved seeding for random number generation. 2023-03-08 23:02:20 +01:00
Martin Preuss
7dbd50eeba avr: started working on flash module. 2023-02-20 23:48:17 +01:00
Martin Preuss
1726796b68 TIMER: improved module, added some callbacks. 2023-02-20 23:47:56 +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
d3c279101c main.asm: CLI while measuring and preparing packet. Directly call onSystemStart. 2023-02-06 21:55:10 +01:00
Martin Preuss
e6390a17ac comproto: Fixed a bug.
Was not saving low byte of value.
2023-02-06 21:54:04 +01:00
Martin Preuss
2ce2aa03c8 Always use new shortened address assignment protocol if possible. 2023-02-06 21:11:24 +01:00
Martin Preuss
b3b5aaba43 main: only send value messages if we have an address. 2023-02-06 21:10:41 +01:00
Martin Preuss
df70342ff3 AVR: More work on address assignment procedure. 2023-02-06 21:09:38 +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
746cec2d45 comproto: simplified some enqueue routines. Renamed i2c to twi.
- simplified CPRO_EnqueueComSendStats
- simplified CPRO_EnqueueValue
- renamed i2c to twi
2023-02-05 15:37:47 +01:00
Martin Preuss
d4081840e0 comproto: started simplifying code to prepare and enqueue packets. 2023-02-05 14:57:38 +01:00
Martin Preuss
f58f301423 Call UID generator (if necessary). 2023-02-04 16:02:18 +01:00
Martin Preuss
910bb78e52 COMPROTO: Added CPRO_EnqueueNeedAddress 2023-02-04 16:01:48 +01:00
Martin Preuss
1c08bcb1ba Added tests for pseudo random generator. 2023-02-04 16:01:32 +01:00
Martin Preuss
9b0831765b Timer: Added callback onSystemStart 2023-02-04 16:01:09 +01:00
Martin Preuss
97724bf7fe Utils: Added pseudo random generator. 2023-02-04 16:00:50 +01:00
Martin Preuss
4587dfb9dd base: Started working on maintenance system. 2023-02-04 00:57:31 +01:00
Martin Preuss
cc7bc1e669 Utils: added code to write FLASH (bot tested, yet). 2023-02-04 00:56:59 +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
Martin Preuss
ee73dd8fe8 Timer: Add callback "onEvery30s". 2023-02-02 00:42:28 +01:00
Martin Preuss
6a0ebe6eb8 TWI master: Added remarks. 2023-02-02 00:42:04 +01:00
Martin Preuss
2f6b23cd53 LCD: Minor changes. 2023-02-02 00:41:35 +01:00
Martin Preuss
b27f7760cf Added module for SI7021 temp/humidity sensor. 2023-02-02 00:39:57 +01:00
Martin Preuss
93b71099c4 COM: Added routine COM_EnqueueValue.
This sends a message with a sensor value.
2023-02-02 00:39:29 +01:00
Martin Preuss
b34f3ce2cb main: init bmp280. cleanup. 2023-01-30 01:03:02 +01:00
Martin Preuss
4864d16482 twi_master: add routine twiReceiveByteSendAck. 2023-01-30 01:02:31 +01:00
Martin Preuss
89f403f602 LCD: moved address definition to main file. 2023-01-30 01:02:04 +01:00
Martin Preuss
b4f16dd987 bmp280: more work on module. 2023-01-30 01:01:19 +01:00
Martin Preuss
8b3a1defd7 bmp280: started working on module. 2023-01-30 00:29:39 +01:00
Martin Preuss
2bfd64a22b Main: Write COM stats every 10s. 2023-01-29 18:51:30 +01:00
Martin Preuss
94d81cd46b COM: Enabled packet-in counter. 2023-01-29 18:51:15 +01:00
Martin Preuss
704ca66baa Utils: Dixed Utils_IncrementCounter32, added Utils_IncrementCounter16. 2023-01-29 18:50:41 +01:00
Martin Preuss
6d59a818a5 LCD: Cleanup. 2023-01-29 18:50:15 +01:00
Martin Preuss
ff8db6a210 LCD: Completed, works now. 2023-01-29 15:47:12 +01:00
Martin Preuss
2f1a915390 Increased I2C speed. Added twiSendByteExpectAck. 2023-01-29 15:46:58 +01:00
Martin Preuss
aac3c16b29 Started working on LCD module. 2023-01-28 15:29:58 +01:00
Martin Preuss
02b09e9ff7 COM: Added COM_EnqueueDebug 2023-01-28 15:29:43 +01:00
Martin Preuss
4cbcfd6c01 main: added tests for twi module. COM: added COM_EnqueueI2cBusMember 2023-01-28 00:11:03 +01:00