enabled specifying numeric config values using all strtof capabilities
[clinton/Smoothieware.git] / src / libs / StepTicker.h
CommitLineData
df27a6a3 1/*
cd011f58
AW
2 This file is part of Smoothie (http://smoothieware.org/). The motion control part is heavily based on Grbl (https://github.com/simen/grbl).
3 Smoothie is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
4 Smoothie is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
df27a6a3 5 You should have received a copy of the GNU General Public License along with Smoothie. If not, see <http://www.gnu.org/licenses/>.
cd011f58
AW
6*/
7
8
9
3b1e82d2
AW
10#ifndef STEPTICKER_H
11#define STEPTICKER_H
12
13using namespace std;
14#include <vector>
5673fe39 15
3b1e82d2 16#include "libs/Module.h"
5673fe39
MM
17
18class StepperMotor;
3b1e82d2
AW
19
20class StepTicker{
21 public:
22 StepTicker();
1ad23cd3 23 void set_frequency( float frequency );
3b1e82d2 24 void tick();
bd0f7508 25 void signal_moves_finished();
670fa10b 26 StepperMotor* add_stepper_motor(StepperMotor* stepper_motor);
1ad23cd3 27 void set_reset_delay( float seconds );
3b1e82d2 28 void reset_tick();
670fa10b
L
29 void add_motor_to_active_list(StepperMotor* motor);
30 void remove_motor_from_active_list(StepperMotor* motor);
3b1e82d2 31
1ad23cd3 32 float frequency;
670fa10b 33 vector<StepperMotor*> stepper_motors;
feb204be
AW
34 uint32_t delay;
35 uint32_t period;
36 uint32_t debug;
37 uint32_t last_duration;
650ed0a8 38 bool has_axes;
796c9f32 39
bd0f7508
AW
40 bool moves_finished;
41 bool reset_step_pins;
42
670fa10b 43 StepperMotor* active_motors[12];
6e0063ab 44 uint32_t active_motor_bm;
12aad2a0 45
3b1e82d2
AW
46};
47
48
49
3b1e82d2 50#endif