fsensor.h 869 B

123456789101112131415161718192021222324252627282930313233
  1. //! @file
  2. #ifndef FSENSOR_H
  3. #define FSENSOR_H
  4. #include <inttypes.h>
  5. #include "config.h"
  6. #ifdef PAT9125
  7. // optical checking "chunk lenght" (already in steps)
  8. extern int16_t fsensor_chunk_len;
  9. // count of soft failures
  10. extern uint8_t fsensor_softfail;
  11. //! update axis resolution
  12. extern void fsensor_set_axis_steps_per_unit(float u);
  13. //! @name callbacks from stepper
  14. //! @{
  15. extern void fsensor_st_block_chunk(int cnt);
  16. // debugging
  17. extern uint8_t fsensor_log;
  18. // There's really nothing to do in block_begin: the stepper ISR likely has
  19. // called us already at the end of the last block, making this integration
  20. // redundant. LA1.5 might not always do that during a coasting move, so attempt
  21. // to drain fsensor_st_cnt anyway at the beginning of the new block.
  22. #define fsensor_st_block_begin(rev) fsensor_st_block_chunk(0)
  23. //! @}
  24. #endif //PAT9125
  25. #endif //FSENSOR_H