mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-18 19:12:09 +00:00

* feature-T1000-E: add Added the board definition for T1000-E - integrate a script for rapid dependency download that is compatible with both Linux and Windows platforms. - add the pin definitions for UART, SPI, GPIO, and other peripherals have been ensured to be correct. - add the env configuration for PlatformIO. * refact-T1000-E: redefine T1000-E board * feature-T1000-E: add basic sensors * feature-T1000-E: add button init * feat: add DRADIOLIB_GODMODE defination for use function setDioAsRfSwitch to DIO LORA RF * feat : add gps(GNSS_Airoha) sleep mode * feat: add behavier when rec or send message * chore: hang IIC bus usage to avoid sensor address conflict * feat: add sensor data acquisition * feat : support Airoha GPS - add disable it in FSM - update lookForTime and lookForLocation function * fix: fix a bug * version: change version to 0.9.0 * Update tracker-t1000-e.json Remove a space * Delete variants/tracker-t1000-e/run_once.sh Delete not need as we will change platformio.ini * Update platformio.ini Update SoftDevice 7.3.0 usage in line with other lr1110 targets Do we need to keep GODMODE ? * fix: Button behavier incorrect bug * fix:remove some invaild code of TextMessageModule * fix: remove invaild comment * version: change version to 0.9.1 - update mark's patch - remove some invaild code and comments - fix button behavier * trunk format * fix: HELTEC_CAPSULE_SENSOR_V3 block got accidentally deleted * fix: EnvironmentTelemetry upstream merge went awry. * fix: Added macro definitions to ensure correct operation of LORA section * fix :GNSS_AIROHA macro defination in line with others * fix: upstream backmerge accidentally. * fix: wrap macro PIN_3V3_EN BUZZER_EN_PIN GNSS_AIROHA in the TRACKER_T1000_E macro guard --------- Co-authored-by: Mark Trevor Birss <markbirss@gmail.com> Co-authored-by: Ben Meadors <benmmeadors@gmail.com> Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
29 lines
897 B
C++
29 lines
897 B
C++
#include "TextMessageModule.h"
|
|
#include "MeshService.h"
|
|
#include "NodeDB.h"
|
|
#include "PowerFSM.h"
|
|
#include "buzz.h"
|
|
#include "configuration.h"
|
|
TextMessageModule *textMessageModule;
|
|
|
|
ProcessMessage TextMessageModule::handleReceived(const meshtastic_MeshPacket &mp)
|
|
{
|
|
#ifdef DEBUG_PORT
|
|
auto &p = mp.decoded;
|
|
LOG_INFO("Received text msg from=0x%0x, id=0x%x, msg=%.*s\n", mp.from, mp.id, p.payload.size, p.payload.bytes);
|
|
#endif
|
|
// We only store/display messages destined for us.
|
|
// Keep a copy of the most recent text message.
|
|
devicestate.rx_text_message = mp;
|
|
devicestate.has_rx_text_message = true;
|
|
|
|
powerFSM.trigger(EVENT_RECEIVED_MSG);
|
|
notifyObservers(&mp);
|
|
|
|
return ProcessMessage::CONTINUE; // Let others look at this message also if they want
|
|
}
|
|
|
|
bool TextMessageModule::wantPacket(const meshtastic_MeshPacket *p)
|
|
{
|
|
return MeshService::isTextPayload(p);
|
|
} |