Skip to content

Commit 458990c

Browse files
authored
Merge pull request #161 from gagarcr/Remove_warnigs
I am merging, thanks!
2 parents 5038266 + 0fec3da commit 458990c

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

src/communication/Commander.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ class Commander
207207
* - velocity : velocity torque (ex.P10 2.5 or P10 to only chanage the target witout limits)
208208
* - angle : angle velocity torque (ex.P3.5 10 2.5 or P3.5 to only chanage the target witout limits)
209209
*/
210-
void target(FOCMotor* motor, char* user_cmd, char* separator = " ");
210+
void target(FOCMotor* motor, char* user_cmd, char* separator = (char *)" ");
211211

212212
/**
213213
* FOC motor (StepperMotor and BLDCMotor) motion control interfaces
@@ -237,7 +237,7 @@ class Commander
237237
* - velocity (open and closed loop) : velocity torque (ex.M10 2.5 or M10 to only chanage the target witout limits)
238238
* - angle (open and closed loop) : angle velocity torque (ex.M3.5 10 2.5 or M3.5 to only chanage the target witout limits)
239239
*/
240-
void motion(FOCMotor* motor, char* user_cmd, char* separator = " ");
240+
void motion(FOCMotor* motor, char* user_cmd, char* separator = (char *)" ");
241241

242242
private:
243243
// Subscribed command callback variables

src/current_sense/GenericCurrentSense.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ PhaseCurrent_s GenericCurrentSense::getPhaseCurrents(){
5656
// 3 - success but gains inverted
5757
// 4 - success but pins reconfigured and gains inverted
5858
int GenericCurrentSense::driverAlign(float voltage){
59+
_UNUSED(voltage) ; // remove unused parameter warning
5960
int exit_flag = 1;
6061
if(skip_align) return exit_flag;
6162

src/drivers/BLDCDriver6PWM.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,8 @@ void BLDCDriver6PWM::setPwm(float Ua, float Ub, float Uc) {
8383

8484
// Set voltage to the pwm pin
8585
void BLDCDriver6PWM::setPhaseState(int sa, int sb, int sc) {
86+
_UNUSED(sa);
87+
_UNUSED(sb);
88+
_UNUSED(sc);
8689
// TODO implement disabling
8790
}

src/drivers/hardware_specific/generic_mcu.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ __attribute__((weak)) void* _configure4PWM(long pwm_frequency, const int pin1A,
4646
// - BLDC driver - 6PWM setting
4747
// - hardware specific
4848
__attribute__((weak)) void* _configure6PWM(long pwm_frequency, float dead_zone, const int pinA_h, const int pinA_l, const int pinB_h, const int pinB_l, const int pinC_h, const int pinC_l){
49+
_UNUSED(pwm_frequency);
50+
_UNUSED(dead_zone);
51+
_UNUSED(pinA_h);
52+
_UNUSED(pinA_l);
53+
_UNUSED(pinB_h);
54+
_UNUSED(pinB_l);
55+
_UNUSED(pinC_h);
56+
_UNUSED(pinC_l);
57+
4958
return SIMPLEFOC_DRIVER_INIT_FAILED;
5059
}
5160

0 commit comments

Comments
 (0)