File tree Expand file tree Collapse file tree 18 files changed +188
-167
lines changed Expand file tree Collapse file tree 18 files changed +188
-167
lines changed Original file line number Diff line number Diff line change 44#include < memory>
55#include " settings/config.h"
66
7+ using namespace std ;
8+
79namespace LoraDv {
810
911class AudioCodec {
1012
1113public:
12- virtual bool start (std:: shared_ptr<const Config> config) = 0;
14+ virtual bool start (shared_ptr<const Config> config) = 0;
1315 virtual void stop () = 0;
1416
1517 virtual int encode (uint8_t *encodedOut, int16_t *pcmIn) = 0;
Original file line number Diff line number Diff line change 44#include < opus.h>
55#include " audio/audio_codec.h"
66
7+ using namespace std ;
8+
79namespace LoraDv {
810
911class AudioCodecOpus : public AudioCodec {
1012
1113public:
1214 AudioCodecOpus ();
1315
14- virtual bool start (std:: shared_ptr<const Config> config) override ;
16+ virtual bool start (shared_ptr<const Config> config) override ;
1517 virtual void stop () override ;
1618
1719 virtual int encode (uint8_t *encodedOut, int16_t *pcmIn) override ;
Original file line number Diff line number Diff line change 1111#include " audio/audio_codec.h"
1212#include " utils/dsp.h"
1313
14+ using namespace std ;
15+
1416namespace LoraDv {
1517
1618class RadioTask ;
1719
1820class AudioTask {
1921
2022public:
21- explicit AudioTask (std:: shared_ptr<const Config> config, std:: shared_ptr<PmService> pmService);
23+ explicit AudioTask (shared_ptr<const Config> config, shared_ptr<PmService> pmService);
2224
23- void start (std:: shared_ptr<RadioTask> radioTask);
25+ void start (shared_ptr<RadioTask> radioTask);
2426 inline void stop () { isRunning_ = false ; }
2527 bool loop ();
2628
@@ -64,17 +66,17 @@ class AudioTask {
6466 void playTimer ();
6567
6668private:
67- std:: shared_ptr<const Config> config_;
69+ shared_ptr<const Config> config_;
6870 TaskHandle_t audioTaskHandle_;
6971
70- std:: shared_ptr<RadioTask> radioTask_;
71- std:: shared_ptr<PmService> pmService_;
72+ shared_ptr<RadioTask> radioTask_;
73+ shared_ptr<PmService> pmService_;
7274
7375 Timer<1 > playTimer_;
7476 Timer<1 >::Task playTimerTask_;
7577
76- std:: shared_ptr<Dsp> dsp_;
77- std:: shared_ptr<AudioCodec> audioCodec_;
78+ shared_ptr<Dsp> dsp_;
79+ shared_ptr<AudioCodec> audioCodec_;
7880
7981 int16_t *pcmFrameBuffer_;
8082 int16_t *pcmResampleBuffer_;
Original file line number Diff line number Diff line change 55#include < memory>
66#include " settings/config.h"
77
8+ using namespace std ;
9+
810namespace LoraDv {
911
1012class HwMonitor {
1113
1214public:
13- HwMonitor (std:: shared_ptr<const Config> config);
15+ HwMonitor (shared_ptr<const Config> config);
1416
1517 float getBatteryVoltage () const ;
1618
1719private:
18- std:: shared_ptr<const Config> config_;
20+ shared_ptr<const Config> config_;
1921
2022};
2123
Original file line number Diff line number Diff line change 88
99#include " settings/config.h"
1010
11+ using namespace std ;
12+
1113namespace LoraDv {
1214
1315class PmService {
1416
1517public:
16- PmService (std:: shared_ptr<const Config> config, std:: shared_ptr<Adafruit_SSD1306> display);
18+ PmService (shared_ptr<const Config> config, shared_ptr<Adafruit_SSD1306> display);
1719
1820 void setup ();
1921 bool loop ();
@@ -26,8 +28,8 @@ class PmService {
2628 esp_sleep_wakeup_cause_t lightSleepWait (uint64_t sleepTimeUs) const ;
2729
2830private:
29- std:: shared_ptr<const Config> config_;
30- std:: shared_ptr<Adafruit_SSD1306> display_;
31+ shared_ptr<const Config> config_;
32+ shared_ptr<Adafruit_SSD1306> display_;
3133
3234 Timer<1 > lightSleepTimer_;
3335 Timer<1 >::Task lightSleepTimerTask_;
Original file line number Diff line number Diff line change 1313#include " utils/utils.h"
1414#include " settings/settings_menu.h"
1515
16+ using namespace std ;
17+
1618namespace LoraDv {
1719
1820class AudioTask ;
1921
2022class RadioTask {
2123
2224public:
23- explicit RadioTask (std:: shared_ptr<const Config> config);
25+ explicit RadioTask (shared_ptr<const Config> config);
2426
25- void start (std:: shared_ptr<AudioTask> audioTask);
27+ void start (shared_ptr<AudioTask> audioTask);
2628 inline void stop () { isRunning_ = false ; }
2729 bool loop ();
2830
@@ -68,13 +70,13 @@ class RadioTask {
6870 void rigTaskStartTransmit ();
6971
7072private:
71- std:: shared_ptr<const Config> config_;
73+ shared_ptr<const Config> config_;
7274
73- std:: shared_ptr<MODULE_NAME> radioModule_;
74- std:: shared_ptr<AudioTask> audioTask_;
75+ shared_ptr<MODULE_NAME> radioModule_;
76+ shared_ptr<AudioTask> audioTask_;
7577
7678 uint8_t iv_[CfgIvSize];
77- std:: shared_ptr<ChaCha> cipher_;
79+ shared_ptr<ChaCha> cipher_;
7880
7981 static TaskHandle_t loraTaskHandle_;
8082
Original file line number Diff line number Diff line change 2222#include " hal/hw_monitor.h"
2323#include " settings/settings_menu.h"
2424
25+ using namespace std ;
26+
2527namespace LoraDv {
2628
2729class Service {
2830
2931public:
30- Service (std:: shared_ptr<Config> conf);
32+ Service (shared_ptr<Config> conf);
3133
3234 void setup ();
3335 void loop ();
@@ -51,18 +53,18 @@ class Service {
5153 bool processRotaryEncoder ();
5254
5355private:
54- std:: shared_ptr<Config> config_;
56+ shared_ptr<Config> config_;
5557
56- std:: shared_ptr<Adafruit_SSD1306> display_;
57- static std:: shared_ptr<AiEsp32RotaryEncoder> rotaryEncoder_;
58+ shared_ptr<Adafruit_SSD1306> display_;
59+ static shared_ptr<AiEsp32RotaryEncoder> rotaryEncoder_;
5860
59- std:: shared_ptr<PmService> pmService_;
60- std:: shared_ptr<HwMonitor> hwMonitor_;
61+ shared_ptr<PmService> pmService_;
62+ shared_ptr<HwMonitor> hwMonitor_;
6163
62- std:: shared_ptr<RadioTask> radioTask_;
63- std:: shared_ptr<AudioTask> audioTask_;
64+ shared_ptr<RadioTask> radioTask_;
65+ shared_ptr<AudioTask> audioTask_;
6466
65- std:: shared_ptr<SettingsMenu> settingsMenu_;
67+ shared_ptr<SettingsMenu> settingsMenu_;
6668
6769 // other
6870 volatile bool btnPressed_;
Original file line number Diff line number Diff line change 1414#include " hal/radio_task.h"
1515#include " utils/utils.h"
1616
17+ using namespace std ;
18+
1719namespace LoraDv {
1820
1921class SettingsMenu {
2022public:
21- SettingsMenu (std:: shared_ptr<Config> config);
23+ SettingsMenu (shared_ptr<Config> config);
2224
23- void draw (std:: shared_ptr<Adafruit_SSD1306> display);
25+ void draw (shared_ptr<Adafruit_SSD1306> display);
2426
2527 void onEncoderPositionChanged (int delta);
2628 void onEncoderButtonClicked ();
2729
2830private:
2931 bool isValueSelected_;
3032 int selectedMenuItemIndex_;
31- std:: shared_ptr<Config> config_;
32- std:: vector<std:: shared_ptr<SettingsMenuItem>> items_; // Updated type
33+ shared_ptr<Config> config_;
34+ vector<shared_ptr<SettingsMenuItem>> items_; // Updated type
3335};
3436
3537} // LoraDv
You can’t perform that action at this time.
0 commit comments