mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-06 15:21:09 +00:00
* Add Missing Includes Across src/slic3r/GUI Every GUI source and header now directly includes the headers declaring what it uses, rather than relying on the precompiled header or transitive includes. Generated with clang-tidy misc-include-cleaner, plus one hand edit making CalibrationPanel.hpp self-contained. * Drop the OS-Specific Includes Added Outside Their Platform Guards GLib, GTK, D-Bus and POSIX headers are only used inside platform #if blocks, which already include them. Added unconditionally at the top of the file they broke the Windows build. * Add the clang-tidy Configuration That Generated These Includes Only misc-include-cleaner's missing-include check, with the headers it must never suggest: per-platform, internal and OS-specific ones that would break other platforms or are not meant to be included directly. * Match Windows Paths in the clang-tidy Ignore List Header paths use backslashes on Windows, so every / in a pattern is now [/\\]. The Windows SDK headers are ignored alongside the other OS-specific ones, and the list is one pattern per line. Suggested by @raistlin7447 from a Windows clang-cl run.
71 lines
1.9 KiB
C++
71 lines
1.9 KiB
C++
#pragma once
|
|
#include "DevFirmware.h"
|
|
#include "slic3r/Utils/json_diff.hpp"
|
|
|
|
#include <nlohmann/json.hpp>
|
|
#include <string>
|
|
#include <wx/string.h>
|
|
#include "slic3r/Utils/json_diff.hpp"
|
|
|
|
namespace Slic3r {
|
|
|
|
//Previous definitions
|
|
class MachineObject;
|
|
|
|
// Orca: firmware-type enum consumed by DeviceManager/UpgradePanel; no reference-side equivalent yet
|
|
enum PrinterFirmwareType
|
|
{
|
|
FIRMWARE_TYPE_ENGINEER = 0,
|
|
FIRMWARE_TYPE_PRODUCTION,
|
|
FIRMEARE_TYPE_UKNOWN,
|
|
};
|
|
|
|
class FirmwareInfo
|
|
{
|
|
public:
|
|
std::string module_type; // ota or ams
|
|
std::string version;
|
|
std::string url;
|
|
std::string name;
|
|
std::string description;
|
|
};
|
|
|
|
|
|
class DevFirmwareVersionInfo
|
|
{
|
|
public:
|
|
std::string name;
|
|
wxString product_name;
|
|
std::string sn;
|
|
std::string hw_ver;
|
|
std::string sw_ver;
|
|
std::string sw_new_ver;
|
|
int firmware_flag = 0;
|
|
|
|
public:
|
|
bool isValid() const { return !sn.empty(); }
|
|
|
|
/*type check*/
|
|
bool isAirPump() const { return product_name.Contains("Air Pump"); }
|
|
bool isLaszer() const { return product_name.Contains("Laser"); }
|
|
bool isCuttingModule() const { return product_name.Contains("Cutting Module"); }
|
|
bool isRotary() const { return product_name.Contains("Rotary"); }// Rotary Attachment
|
|
bool isExtinguishSystem() const { return product_name.Contains("Extinguishing System"); }// Auto Fire Extinguishing System
|
|
bool isWTM() const { return name.find("wtm") != string::npos; } // nozzle
|
|
bool isExhaustFan() const { return product_name.Contains("Exhaust Fan"); }
|
|
bool isHmshub() const { return product_name.find("Filament Buffer") != string::npos; }
|
|
bool isFilaTrackSwitch() const { return product_name.find("Filament Track") != string::npos; }
|
|
|
|
};
|
|
|
|
|
|
class DevFirmware
|
|
{
|
|
public:
|
|
DevFirmware(MachineObject* obj) : m_owner(obj) {}
|
|
|
|
private:
|
|
[[maybe_unused]] MachineObject* m_owner = nullptr;
|
|
};
|
|
|
|
} // namespace Slic3r
|