How metay09/orun-tlp-system works
ORUN TLP is embedded firmware for a low-power location and activity-tracking device with LoRa networking and BLE application access. Its principal workflow is to acquire GNSS fixes, map them into position packets, and transmit them over radio; radio networking also supports relaying. Separate capabilities cover accelerometer-based activity capture, geofencing, BLE requests and handoff, and durable configuration, history, and security state. The excerpts show peripheral managers and parts of the main composition, but not the full loop or most subsystem implementations, so uncertain dispatch and persistence links are omitted.
Main entry points: position_flow.cpp Position flow · main.cpp Firmware composition · activity_capture.cpp Activity capture · radio_manager.cpp Radio manager
Components 29
Sensing
- GNSS acquisition
firmware/src/gnss_manager.cpp - Accelerometer sampling
firmware/src/accelerometer_manager.cpp - Sensor power control
firmware/src/sensor_power_manager.cpp - I2C recovery
firmware/src/i2c_recovery.cpp - Activity capture
firmware/src/activity_capture.cpp - Activity quality
firmware/src/activity_quality.cpp - Activity windows
firmware/src/activity_window.cpp
Location and LoRa
- Position flow
firmware/src/position_flow.cpp - Legacy position mapping
firmware/src/legacy_position_mapping.cpp - Position packet
firmware/src/tlp_position_packet.cpp - Radio manager
firmware/src/radio_manager.cpp - Network and relay
firmware/src/network_service.cpp - Relay packet
firmware/src/tlp_relay_forward_packet.cpp
Device applications
- Firmware composition
firmware/src/main.cpp - Geofence runtime
firmware/src/geofence_runtime.cpp - BLE application transport
firmware/src/ble_application_transport.cpp - BLE application handoff
firmware/src/ble_application_handoff.cpp - Application requests
firmware/src/application_request.cpp - Watchdog
firmware/src/watchdog_manager.cpp
Durable state
- Configuration store
firmware/src/config_store.cpp - History store
firmware/src/history_store.cpp - Security store
firmware/src/security_store.cpp - Flash mutation gate
firmware/src/flash_mutation_gate.cpp
Other components
- Device user
- GNSS receiver
- Accelerometer
- LoRa network
- Device flash
- BLE client
Connections 29
- Firmware composition → Watchdog: starts and feeds
- Firmware composition → Sensor power control: initializes
- Firmware composition → Radio manager: sets identity
- Firmware composition → Position flow: sets identity
- GNSS acquisition → GNSS receiver: acquires fixes
- GNSS acquisition → Sensor power control: owns sensor rail
- GNSS acquisition → I2C recovery: recovers bus
- Accelerometer sampling → Accelerometer: reads samples
- Accelerometer sampling → I2C recovery: recovers bus
- Activity capture → Accelerometer sampling: requests samples
- Activity capture → Activity quality: uses quality checks
- Activity capture → Activity windows: uses windows
- Position flow → Legacy position mapping: maps fixes
- Position flow → Position packet: encodes positions
- Position flow → Radio manager: submits packets
- Radio manager → LoRa network: transmits and receives
- Radio manager → Network and relay: initializes network
- Network and relay → Relay packet: uses relay format
- BLE client → BLE application transport: exchanges messages
- BLE application transport → BLE application handoff: hands off data
- BLE application transport → Application requests: handles requests
- Device user → Activity capture: starts capture
- Configuration store → Device flash: persists config
- History store → Device flash: persists history
- Security store → Device flash: persists security state
- Configuration store → Flash mutation gate: arbitrates mutations
- History store → Flash mutation gate: arbitrates mutations
- Security store → Flash mutation gate: arbitrates mutations
- Geofence runtime → Position flow: uses position flow