5 extern const uint16_t FW_VERSION_NR[4];
6 const char* FW_VERSION_STR_P();
8 extern const char FW_VERSION_HASH[];
9 const char* FW_VERSION_HASH_P();
16 enum FirmwareRevisionFlavorType : uint16_t {
17 FIRMWARE_REVISION_RELEASED = 0x0040,
18 FIRMWARE_REVISION_DEV = 0x0000,
19 FIRMWARE_REVISION_ALPHA = 0x008,
20 FIRMWARE_REVISION_BETA = 0x0010,
21 FIRMWARE_REVISION_RC = 0x0020
24 bool show_upgrade_dialog_if_version_newer(
const char *version_string);
25 bool eeprom_fw_version_older_than_p(
const uint16_t (&req_ver)[4]);
26 void update_current_firmware_version_to_eeprom();
28 #define EEPROM_NOZZLE_DIAMETER_uM_DEFAULT 400
30 enum class ClPrintChecking:uint_least8_t
41 enum class ClNozzleDiameter:uint_least8_t
47 _Diameter_Undef=EEPROM_EMPTY_VALUE
50 enum class ClCheckMode:uint_least8_t
55 _Undef=EEPROM_EMPTY_VALUE
58 enum class ClCheckModel:uint_least8_t
63 _Undef=EEPROM_EMPTY_VALUE
66 enum class ClCheckVersion:uint_least8_t
71 _Undef=EEPROM_EMPTY_VALUE
74 enum class ClCheckGcode:uint_least8_t
79 _Undef=EEPROM_EMPTY_VALUE
82 #define COMPARE_VALUE_EQUAL (((uint8_t)ClCompareValue::_Equal<<6)+((uint8_t)ClCompareValue::_Equal<<4)+((uint8_t)ClCompareValue::_Equal<<2)+((uint8_t)ClCompareValue::_Equal))
83 enum class ClCompareValue:uint_least8_t
99 char * pStrEnd = NULL;
102 this->ptr = strchr(pStr,
'"');
112 pStrEnd = strchr(this->ptr,
'"');
117 this->len = pStrEnd - this->ptr;
121 bool WasFound() {
return found; }
122 uint8_t GetLength() {
return len; }
123 const char * GetUnquotedString() {
return ptr; }
125 const char * ptr = NULL;
130 extern ClNozzleDiameter oNozzleDiameter;
131 extern ClCheckMode oCheckMode;
132 extern ClCheckModel oCheckModel;
133 extern ClCheckVersion oCheckVersion;
134 extern ClCheckGcode oCheckGcode;
136 void fCheckModeInit();
137 void nozzle_diameter_check(uint16_t nDiameter);
138 void printer_model_check(uint16_t nPrinterModel, uint16_t actualPrinterModel);
139 void printer_smodel_check(
const char *pStrPos,
const char *actualPrinterSModel);
140 void fw_version_check(
const char *pVersion);
141 void gcode_level_check(uint16_t nGcodeLevel);
143 uint16_t nPrinterType(
bool bMMu);
144 const char *sPrinterType(
bool bMMu);
146 #define IP4_STR_SIZE 16
147 extern void ip4_to_str(
char* dest, uint8_t* IP);
151 typedef uint8_t CalibrationStatus;
152 const CalibrationStatus CALIBRATION_STATUS_SELFTEST = 0b00000001;
153 const CalibrationStatus CALIBRATION_STATUS_XYZ = 0b00000010;
154 const CalibrationStatus CALIBRATION_STATUS_Z = 0b00000100;
156 const CalibrationStatus CALIBRATION_STATUS_THERMAL_MODEL = 0b00001000;
158 const CalibrationStatus CALIBRATION_STATUS_LIVE_ADJUST = 0b00010000;
159 const CalibrationStatus CALIBRATION_STATUS_UNKNOWN = 0b10000000;
162 const CalibrationStatus CALIBRATION_WIZARD_STEPS =
163 CALIBRATION_STATUS_SELFTEST |
164 CALIBRATION_STATUS_XYZ |
165 CALIBRATION_STATUS_Z |
167 CALIBRATION_STATUS_THERMAL_MODEL |
169 CALIBRATION_STATUS_LIVE_ADJUST;
172 const CalibrationStatus CALIBRATION_FORCE_PREP = CALIBRATION_STATUS_Z;
174 bool calibration_status_get(CalibrationStatus components);
175 void calibration_status_set(CalibrationStatus components);
176 void calibration_status_clear(CalibrationStatus components);
179 inline bool calibration_status_pinda() {
return eeprom_read_byte((uint8_t*)EEPROM_CALIBRATION_STATUS_PINDA); }
__attribute__((always_inline)) unquoted_string(const char *const pStr)
Given a pointer to a quoted string, filter out the quotes.
Definition: util.h:95