|
3-phase PV router
|
Support for remotely controlled loads via RF using RFM69. More...
#include <Arduino.h>#include "config_system.h"#include "types.h"#include "config_derived.h"#include "remote_loads_core.h"#include "utils_rf.h"

Go to the source code of this file.
Functions | |
| void | processRemoteLoadTransmissions () |
| Process pending RF transmissions. | |
Support for remotely controlled loads via RF using RFM69.
Radio shell around RemoteLoadCore (remote_loads_core.h). The core decides what each remote unit should be told and when; this file does the telling, using the shared RFM69 instance from utils_rf.h.
Up to MAX_REMOTE_UNITS separate units are supported, each with its own node ID (RFConfig::REMOTE_NODE_ID[]) and its own one-byte payload. A unit is addressed when at least one entry of the load map names it.
Transmission policy, per unit:
Active when the load map holds at least one remote load; otherwise the whole RF path, radio instance included, is dropped by the linker.
Definition in file remote_loads.h.
|
inline |
Process pending RF transmissions.
Call this from the main loop to handle RF transmissions outside ISR context. This prevents blocking the ISR with RF communication delays.
Nothing is sent while the RF module is not initialized (missing, unpowered or badly wired at startup): the library would wait up to 1 s for a free channel on each send, then possibly forever for the "packet sent" flag, which a module that does not answer never raises. The payloads stay pending, and go out once sendResults() has brought the module up (it retries once per datalog period).
remoteLoads is declared (end of config.h); it is a template-free inline function, so that is resolved at the call site. Definition at line 55 of file remote_loads.h.

