Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devt #966

Merged
merged 2 commits into from
Jul 13, 2023
Merged

Devt #966

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions FluidNC/src/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include <vector>
#include <nvs.h>

std::vector<Setting*> Setting::List = {};
std::vector<Command*> Command::List = {};
std::vector<Setting*> Setting::List __attribute__((init_priority(101))) = {};
std::vector<Command*> Command::List __attribute__((init_priority(102))) = {};

bool anyState() {
return false;
Expand All @@ -35,14 +35,14 @@ Command::Command(
const char* description, type_t type, permissions_t permissions, const char* grblName, const char* fullName, bool (*cmdChecker)()) :
Word(type, permissions, description, grblName, fullName),
_cmdChecker(cmdChecker) {
List.push_back(this);
List.insert(List.begin(), this);
}

Setting::Setting(
const char* description, type_t type, permissions_t permissions, const char* grblName, const char* fullName, bool (*checker)(char*)) :
Word(type, permissions, description, grblName, fullName),
_checker(checker) {
List.push_back(this);
List.insert(List.begin(), this);

// NVS keys are limited to 15 characters, so if the setting name is longer
// than that, we derive a 15-character name from a hash function
Expand Down
2 changes: 1 addition & 1 deletion FluidNC/src/WebUI/BTConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

// SerialBT sends the data over Bluetooth
namespace WebUI {
BTConfig bt_config;
BTConfig bt_config __attribute__((init_priority(105))) ;
BluetoothSerial SerialBT;
BTChannel btChannel;
}
Expand Down
2 changes: 1 addition & 1 deletion FluidNC/src/WebUI/NotificationsService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "NotificationsService.h"

namespace WebUI {
NotificationsService notificationsService;
NotificationsService notificationsService __attribute__((init_priority(106))) ;
}

#ifdef ENABLE_WIFI
Expand Down
2 changes: 1 addition & 1 deletion FluidNC/src/WebUI/TelnetServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifdef ENABLE_WIFI

namespace WebUI {
TelnetServer telnetServer;
TelnetServer telnetServer __attribute__((init_priority(107))) ;
}

# include "WifiServices.h"
Expand Down
2 changes: 1 addition & 1 deletion FluidNC/src/WebUI/WebServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ namespace WebUI {

static const char LOCATION_HEADER[] = "Location";

Web_Server webServer;
Web_Server webServer __attribute__((init_priority(108))) ;
bool Web_Server::_setupdone = false;
uint16_t Web_Server::_port = 0;

Expand Down
2 changes: 1 addition & 1 deletion FluidNC/src/WebUI/WifiConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <sstream>
#include <iomanip>

WebUI::WiFiConfig wifi_config;
WebUI::WiFiConfig wifi_config __attribute__((init_priority(109))) ;

#ifdef ENABLE_WIFI
# include "../Config.h"
Expand Down