unsigned char => uint8_t

2.0.x
Scott Lahteine 8 years ago
parent 8935bed594
commit 076f3a8284

@ -64,10 +64,10 @@ int Temperature::current_temperature_raw[HOTENDS] = { 0 },
float Temperature::redundant_temperature = 0.0; float Temperature::redundant_temperature = 0.0;
#endif #endif
unsigned char Temperature::soft_pwm_bed; uint8_t Temperature::soft_pwm_bed;
#if ENABLED(FAN_SOFT_PWM) #if ENABLED(FAN_SOFT_PWM)
unsigned char Temperature::fanSpeedSoftPwm[FAN_COUNT]; uint8_t Temperature::fanSpeedSoftPwm[FAN_COUNT];
#endif #endif
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -188,10 +188,10 @@ int Temperature::minttemp_raw[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_RAW_LO_TEMP ,
millis_t Temperature::next_auto_fan_check_ms = 0; millis_t Temperature::next_auto_fan_check_ms = 0;
#endif #endif
unsigned char Temperature::soft_pwm[HOTENDS]; uint8_t Temperature::soft_pwm[HOTENDS];
#if ENABLED(FAN_SOFT_PWM) #if ENABLED(FAN_SOFT_PWM)
unsigned char Temperature::soft_pwm_fan[FAN_COUNT]; uint8_t Temperature::soft_pwm_fan[FAN_COUNT];
#endif #endif
#if ENABLED(FILAMENT_WIDTH_SENSOR) #if ENABLED(FILAMENT_WIDTH_SENSOR)
@ -482,7 +482,7 @@ int Temperature::getHeaterPower(int heater) {
for (uint8_t f = 0; f < COUNT(fanPin); f++) { for (uint8_t f = 0; f < COUNT(fanPin); f++) {
int8_t pin = fanPin[f]; int8_t pin = fanPin[f];
if (pin >= 0 && !TEST(fanDone, fanBit[f])) { if (pin >= 0 && !TEST(fanDone, fanBit[f])) {
unsigned char newFanSpeed = TEST(fanState, fanBit[f]) ? EXTRUDER_AUTO_FAN_SPEED : 0; uint8_t newFanSpeed = TEST(fanState, fanBit[f]) ? EXTRUDER_AUTO_FAN_SPEED : 0;
// this idiom allows both digital and PWM fan outputs (see M42 handling). // this idiom allows both digital and PWM fan outputs (see M42 handling).
digitalWrite(pin, newFanSpeed); digitalWrite(pin, newFanSpeed);
analogWrite(pin, newFanSpeed); analogWrite(pin, newFanSpeed);
@ -1414,19 +1414,19 @@ ISR(TIMER0_COMPB_vect) { Temperature::isr(); }
void Temperature::isr() { void Temperature::isr() {
static unsigned char temp_count = 0; static uint8_t temp_count = 0;
static TempState temp_state = StartupDelay; static TempState temp_state = StartupDelay;
static unsigned char pwm_count = _BV(SOFT_PWM_SCALE); static uint8_t pwm_count = _BV(SOFT_PWM_SCALE);
// Static members for each heater // Static members for each heater
#if ENABLED(SLOW_PWM_HEATERS) #if ENABLED(SLOW_PWM_HEATERS)
static unsigned char slow_pwm_count = 0; static uint8_t slow_pwm_count = 0;
#define ISR_STATICS(n) \ #define ISR_STATICS(n) \
static unsigned char soft_pwm_ ## n; \ static uint8_t soft_pwm_ ## n; \
static unsigned char state_heater_ ## n = 0; \ static uint8_t state_heater_ ## n = 0; \
static unsigned char state_timer_heater_ ## n = 0 static uint8_t state_timer_heater_ ## n = 0
#else #else
#define ISR_STATICS(n) static unsigned char soft_pwm_ ## n #define ISR_STATICS(n) static uint8_t soft_pwm_ ## n
#endif #endif
// Statics per heater // Statics per heater

@ -65,10 +65,10 @@ class Temperature {
static float redundant_temperature; static float redundant_temperature;
#endif #endif
static unsigned char soft_pwm_bed; static uint8_t soft_pwm_bed;
#if ENABLED(FAN_SOFT_PWM) #if ENABLED(FAN_SOFT_PWM)
static unsigned char fanSpeedSoftPwm[FAN_COUNT]; static uint8_t fanSpeedSoftPwm[FAN_COUNT];
#endif #endif
#if ENABLED(PIDTEMP) || ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMP) || ENABLED(PIDTEMPBED)
@ -209,10 +209,10 @@ class Temperature {
static millis_t next_auto_fan_check_ms; static millis_t next_auto_fan_check_ms;
#endif #endif
static unsigned char soft_pwm[HOTENDS]; static uint8_t soft_pwm[HOTENDS];
#if ENABLED(FAN_SOFT_PWM) #if ENABLED(FAN_SOFT_PWM)
static unsigned char soft_pwm_fan[FAN_COUNT]; static uint8_t soft_pwm_fan[FAN_COUNT];
#endif #endif
#if ENABLED(FILAMENT_WIDTH_SENSOR) #if ENABLED(FILAMENT_WIDTH_SENSOR)

Loading…
Cancel
Save