1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-09-02 10:53:01 +02:00

prevent warnings

- move static variable from header to cpp
- remove unused variable
- change deprecated func name in ESP-IDF
This commit is contained in:
odaki
2019-07-08 00:47:48 +09:00
parent 3e9327578c
commit e66b2c1320
3 changed files with 5 additions and 6 deletions

View File

@@ -26,6 +26,8 @@
#ifdef USE_SERVO_AXES
static TaskHandle_t servosSyncTaskHandle = 0;
#ifdef SERVO_X_PIN
ServoAxis X_Servo_Axis(X_AXIS, SERVO_X_PIN, SERVO_X_CHANNEL_NUM);
#endif
@@ -73,7 +75,6 @@ void servosSyncTask(void *pvParameters)
{
TickType_t xLastWakeTime;
const TickType_t xServoFrequency = SERVO_TIMER_INT_FREQ; // in ticks (typically ms)
uint16_t servo_delay_counter = 0;
xLastWakeTime = xTaskGetTickCount(); // Initialise the xLastWakeTime variable with the current time.
while(true) { // don't ever return from this or the task dies
@@ -182,7 +183,7 @@ void ServoAxis::set_location()
float servo_pulse_min, servo_pulse_max;
float min_pulse_cal, max_pulse_cal; // calibration values in percent 110% = 1.1
uint32_t servo_pulse_len;
float servo_pos, mpos, offset, wpos;
float servo_pos, mpos, offset;
// skip location if we are in alarm mode
if (_disable_on_alarm && (sys.state == STATE_ALARM)) {

View File

@@ -85,8 +85,6 @@
#define SERVO_HOMING_OFF 0 // servo is off during homing
#define SERVO_HOMING_TARGET 1 // servo is send to a location during homing
static TaskHandle_t servosSyncTaskHandle = 0;
extern float my_location;
void init_servos();

View File

@@ -114,9 +114,9 @@ void calc_solenoid(float penZ)
// update the PWM value
// ledcWrite appears to have issues with interrupts, so make this a critical section
portMUX_TYPE myMutex = portMUX_INITIALIZER_UNLOCKED;
taskENTER_CRITICAL(&myMutex);
portENTER_CRITICAL(&myMutex);
ledcWrite(SOLENOID_CHANNEL_NUM, solenoid_pen_pulse_len);
taskEXIT_CRITICAL(&myMutex);
portEXIT_CRITICAL(&myMutex);
}
#endif