Save some cycle inside the planner

planner.h:
fan speed is used to set integer variables, so no need for long.
Basicaly a byte should be enough for all the fan things, as it's 0-255?

planner.cpp:
Save some float multiplications.
We could squeeze out even more by defining feedrate_percentage,
saved_feedrate_percentage and flow_percentage as float instead of int.
Everytime they are used in the time-critical planner, they are casted to
float and multiplied by 0.01. Not done jet, as they are used in LCD menu
functions I don't know well enough.
This commit is contained in:
Sebastianv650
2016-11-13 13:23:52 +01:00
parent 665b7f3893
commit e3ffb58fbd
2 changed files with 7 additions and 6 deletions

View File

@ -117,7 +117,7 @@ typedef struct {
acceleration_steps_per_s2; // acceleration steps/sec^2
#if FAN_COUNT > 0
uint32_t fan_speed[FAN_COUNT];
uint16_t fan_speed[FAN_COUNT];
#endif
#if ENABLED(BARICUDA)