Skip to content
Snippets Groups Projects
Commit 867fdba5 authored by 488_MP-4's avatar 488_MP-4
Browse files

any and all changes

parent 7a8ace48
No related branches found
No related tags found
5 merge requests!106Adding Pycrocart 2.1,!104adding cflib to this branch,!98Pycrocart 2.1 will,!94Merge cflib adapter into main,!88Bigquad
...@@ -69,22 +69,22 @@ static bool isInit = false; ...@@ -69,22 +69,22 @@ static bool isInit = false;
static uint16_t motorsBLConvBitsTo16(uint16_t bits) static uint16_t motorsBLConvBitsTo16(uint16_t bits)
{ {
return motorsConv16ToBits_uCart23(bits); //(0xFFFF * (bits - MOTORS_BL_PWM_CNT_FOR_HIGH) / MOTORS_BL_PWM_CNT_FOR_HIGH); return (0xFFFF * (bits - MOTORS_BL_PWM_CNT_FOR_HIGH) / MOTORS_BL_PWM_CNT_FOR_HIGH);
} }
static uint16_t motorsBLConv16ToBits(uint16_t bits) static uint16_t motorsBLConv16ToBits(uint16_t bits)
{ {
return motorsConv16ToBits_uCart23(bits); //(MOTORS_BL_PWM_CNT_FOR_HIGH + ((bits * MOTORS_BL_PWM_CNT_FOR_HIGH) / 0xFFFF)); return (MOTORS_BL_PWM_CNT_FOR_HIGH + ((bits * MOTORS_BL_PWM_CNT_FOR_HIGH) / 0xFFFF));
} }
static uint16_t motorsConvBitsTo16(uint16_t bits) static uint16_t motorsConvBitsTo16(uint16_t bits)
{ {
return motorsConv16ToBits_uCart23(bits); //((bits) << (16 - MOTORS_PWM_BITS)); return ((bits) << (16 - MOTORS_PWM_BITS));
} }
static uint16_t motorsConv16ToBits(uint16_t bits) static uint16_t motorsConv16ToBits(uint16_t bits)
{ {
return motorsConv16ToBits_uCart23(bits); //((bits) >> (16 - MOTORS_PWM_BITS) & ((1 << MOTORS_PWM_BITS) - 1)); return ((bits) >> (16 - MOTORS_PWM_BITS) & ((1 << MOTORS_PWM_BITS) - 1));
} }
static uint16_t motorsConv16ToBits_uCart23(uint16_t bits) static uint16_t motorsConv16ToBits_uCart23(uint16_t bits)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment