-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/fablab-bergamo/fab-o-matic
- Loading branch information
Showing
26 changed files
with
468 additions
and
343 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#ifndef MACHINE_ID_HPP | ||
#define MACHINE_ID_HPP | ||
|
||
#include <cstdint> | ||
|
||
enum class MachineType : uint8_t | ||
{ | ||
Invalid = 0, | ||
Printer3D = 1, | ||
Laser = 2, | ||
Cnc = 3, | ||
PrinterResin = 4, | ||
Other = 5 | ||
}; | ||
|
||
struct MachineID | ||
{ | ||
uint16_t id; | ||
|
||
constexpr MachineID() : id(0) {} | ||
constexpr MachineID(uint16_t id) : id(id) {} | ||
// Add conversion operator to uint16_t to use in print, streams... | ||
constexpr operator uint16_t() const { return id; } | ||
}; | ||
|
||
#endif // MACHINE_ID_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#ifndef OTA_HPP | ||
#define OTA_HPP | ||
|
||
#include "ArduinoOTA.h" | ||
#include <WiFiManager.h> | ||
|
||
#include "secrets.hpp" | ||
|
||
// For ArduinoOTA | ||
const char *const ssid = fabomatic::secrets::credentials::ssid.data(); | ||
const char *const password = fabomatic::secrets::credentials::password.data(); | ||
|
||
namespace fabomatic | ||
{ | ||
|
||
/// @brief Open the ArduinoOTA configuration portal | ||
/// @param force_reset true to discard saved settings and restore compile-time settings | ||
/// @param disable_portal true to skip portal opening (used at boot time) | ||
auto openConfigPortal(bool force_reset, bool disable_portal) -> void; | ||
|
||
auto setupOTA() -> void; | ||
|
||
} // namespace fabomatic | ||
#endif // #ifndef OTA_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.