fsensor.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef FSENSOR_H
  2. #define FSENSOR_H
  3. #include <inttypes.h>
  4. //minimum meassured chunk length in steps
  5. extern int16_t fsensor_chunk_len;
  6. //enable/disable flag
  7. extern bool fsensor_enabled;
  8. //not responding flag
  9. extern bool fsensor_not_responding;
  10. //enable/disable quality meassurement
  11. extern bool fsensor_oq_meassure_enabled;
  12. //save restore printing
  13. extern void fsensor_stop_and_save_print(void);
  14. extern void fsensor_restore_print_and_continue(void);
  15. //initialize
  16. extern void fsensor_init(void);
  17. //enable/disable
  18. extern bool fsensor_enable(void);
  19. extern void fsensor_disable(void);
  20. //autoload feature enabled
  21. extern bool fsensor_autoload_enabled;
  22. extern void fsensor_autoload_set(bool State);
  23. //update (perform M600 on filament runout)
  24. extern void fsensor_update(void);
  25. //setup pin-change interrupt
  26. extern void fsensor_setup_interrupt(void);
  27. //autoload support
  28. extern void fsensor_autoload_check_start(void);
  29. extern void fsensor_autoload_check_stop(void);
  30. extern bool fsensor_check_autoload(void);
  31. //optical quality meassurement support
  32. extern void fsensor_oq_meassure_set(bool State);
  33. extern void fsensor_oq_meassure_start(uint8_t skip);
  34. extern void fsensor_oq_meassure_stop(void);
  35. extern bool fsensor_oq_result(void);
  36. //callbacks from stepper
  37. #include "planner.h"
  38. extern void fsensor_st_block_begin(block_t* bl);
  39. extern void fsensor_st_block_chunk(block_t* bl, int cnt);
  40. #endif //FSENSOR_H