Replace types.h with millis_t.h
This commit is contained in:
parent
eeef4e630a
commit
b641571098
@ -193,9 +193,6 @@
|
||||
|
||||
#define PIN_EXISTS(PN) (defined(PN ##_PIN) && PN ##_PIN >= 0)
|
||||
|
||||
#define PENDING(NOW,SOON) ((long)(NOW-(SOON))<0)
|
||||
#define ELAPSED(NOW,SOON) (!PENDING(NOW,SOON))
|
||||
|
||||
#define MMM_TO_MMS(MM_M) ((MM_M)/60.0f)
|
||||
#define MMS_TO_MMM(MM_S) ((MM_S)*60.0f)
|
||||
|
||||
|
@ -22,25 +22,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
typedef uint32_t millis_t;
|
||||
|
||||
#pragma pack(push, 1) // No padding between fields
|
||||
|
||||
typedef struct {
|
||||
float unload_length, load_length;
|
||||
} fil_change_settings_t;
|
||||
|
||||
typedef struct {
|
||||
float retract_length, // M207 S - G10 Retract length
|
||||
retract_feedrate_mm_s, // M207 F - G10 Retract feedrate
|
||||
retract_zraise, // M207 Z - G10 Retract hop size
|
||||
retract_recover_length, // M208 S - G11 Recover length
|
||||
retract_recover_feedrate_mm_s, // M208 F - G11 Recover feedrate
|
||||
swap_retract_length, // M207 W - G10 Swap Retract length
|
||||
swap_retract_recover_length, // M208 W - G11 Swap Recover length
|
||||
swap_retract_recover_feedrate_mm_s; // M208 R - G11 Swap Recover feedrate
|
||||
} fwretract_settings_t;
|
||||
|
||||
#pragma pack(pop)
|
||||
#define PENDING(NOW,SOON) ((long)(NOW-(SOON))<0)
|
||||
#define ELAPSED(NOW,SOON) (!PENDING(NOW,SOON))
|
@ -27,6 +27,23 @@
|
||||
|
||||
#include "../inc/MarlinConfigPre.h"
|
||||
|
||||
#pragma pack(push, 1) // No padding between fields
|
||||
|
||||
typedef struct {
|
||||
float retract_length, // M207 S - G10 Retract length
|
||||
retract_feedrate_mm_s, // M207 F - G10 Retract feedrate
|
||||
retract_zraise, // M207 Z - G10 Retract hop size
|
||||
retract_recover_length, // M208 S - G11 Recover length
|
||||
retract_recover_feedrate_mm_s, // M208 F - G11 Recover feedrate
|
||||
swap_retract_length, // M207 W - G10 Swap Retract length
|
||||
swap_retract_recover_length, // M208 W - G11 Swap Recover length
|
||||
swap_retract_recover_feedrate_mm_s; // M208 R - G11 Swap Recover feedrate
|
||||
} fwretract_settings_t;
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#if ENABLED(FWRETRACT)
|
||||
|
||||
class FWRetract {
|
||||
private:
|
||||
#if EXTRUDERS > 1
|
||||
@ -69,3 +86,5 @@ public:
|
||||
};
|
||||
|
||||
extern FWRetract fwretract;
|
||||
|
||||
#endif // FWRETRACT
|
||||
|
@ -26,10 +26,16 @@
|
||||
* This may be combined with related G-codes if features are consolidated.
|
||||
*/
|
||||
|
||||
#include "../libs/nozzle.h"
|
||||
typedef struct {
|
||||
float unload_length, load_length;
|
||||
} fil_change_settings_t;
|
||||
|
||||
#include "../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
|
||||
#include "../libs/nozzle.h"
|
||||
|
||||
enum AdvancedPauseMode : char {
|
||||
ADVANCED_PAUSE_MODE_PAUSE_PRINT,
|
||||
ADVANCED_PAUSE_MODE_LOAD_FILAMENT,
|
||||
@ -86,3 +92,5 @@ bool load_filament(const float &slow_load_length=0, const float &fast_load_lengt
|
||||
const bool pause_for_user=false, const AdvancedPauseMode mode=ADVANCED_PAUSE_MODE_PAUSE_PRINT DXC_PARAMS);
|
||||
|
||||
bool unload_filament(const float &unload_length, const bool show_lcd=false, const AdvancedPauseMode mode=ADVANCED_PAUSE_MODE_PAUSE_PRINT);
|
||||
|
||||
#endif //ADVANCED_PAUSE_FEATURE
|
||||
|
@ -19,15 +19,13 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* power.h - power control
|
||||
*/
|
||||
|
||||
#ifndef POWER_H
|
||||
#define POWER_H
|
||||
|
||||
#include "../core/types.h"
|
||||
#include "../core/millis_t.h"
|
||||
|
||||
class Power {
|
||||
public:
|
||||
@ -40,5 +38,3 @@ class Power {
|
||||
};
|
||||
|
||||
extern Power powerManager;
|
||||
|
||||
#endif // POWER_H
|
||||
|
@ -28,7 +28,7 @@
|
||||
#define _POWER_LOSS_RECOVERY_H_
|
||||
|
||||
#include "../sd/cardreader.h"
|
||||
#include "../core/types.h"
|
||||
#include "../core/millis_t.h"
|
||||
#include "../inc/MarlinConfigPre.h"
|
||||
|
||||
#define SAVE_INFO_INTERVAL_MS 0
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "../HAL/platforms.h"
|
||||
#include "../core/boards.h"
|
||||
#include "../core/macros.h"
|
||||
#include "../core/types.h"
|
||||
#include "../core/millis_t.h"
|
||||
#include "Version.h"
|
||||
#include "../../Configuration.h"
|
||||
#include "Conditionals_LCD.h"
|
||||
|
@ -27,7 +27,7 @@
|
||||
//#define DEBUG_STOPWATCH
|
||||
|
||||
#include "../core/macros.h" // for FORCE_INLINE
|
||||
#include "../core/types.h" // for millis_t
|
||||
#include "../core/millis_t.h"
|
||||
|
||||
/**
|
||||
* @brief Stopwatch class
|
||||
|
@ -81,13 +81,8 @@
|
||||
#include "../module/probe.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(FWRETRACT)
|
||||
#include "../feature/fwretract.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
#include "../feature/pause.h"
|
||||
#endif
|
||||
#include "../feature/fwretract.h"
|
||||
#include "../feature/pause.h"
|
||||
|
||||
#if EXTRUDERS > 1
|
||||
#include "tool_change.h"
|
||||
|
Loading…
Reference in New Issue
Block a user