Commit 9bb93b89 authored by Nathan Girard's avatar Nathan Girard
Browse files

Merge branch 'fonction_Sara' into 'master'

Fonction sara

See merge request polystar/robomaster/controle/controle-et-systeme!7
parents 108e7977 38ffa6de
Subproject commit 1cfd4a2bf6001fb18a671a08775f75b5d51baa3b
Subproject commit a77a79c82a93154e6f458d65f994cce0f163f52a
......@@ -471,7 +471,7 @@
<GroupNumber>5</GroupNumber>
<FileNumber>20</FileNumber>
<FileType>1</FileType>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\BSP\Device\motor.c</PathWithFileName>
......@@ -483,7 +483,7 @@
<GroupNumber>5</GroupNumber>
<FileNumber>21</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\BSP\Device\list_motor.c</PathWithFileName>
......
......@@ -159,28 +159,24 @@ int main(void)
/* USER CODE BEGIN 3 */
/* scan is key be pressed down to change target speed and pwm pulse */
/*if (key_scan())
if (key_scan())
{
m3508_frontleft.target += 500;
m3508_frontright.target += 500;
m3508_backleft.target += 500;
m3508_backright.target += 500;
gm6020.target += 40;
if (m3508_frontleft.target > 2000)
{
m3508_frontleft.target = 0;
m3508_frontright.target = 0;
m3508_backleft.target = 0;
m3508_backright.target = 0;
gm6020.target = 0;
}
// PWM_SetAllDuty(&htim1, 0.1f, 0.1f, 0.1f, 0.1f);
// HAL_Delay(2500);
// PWM_SetAllDuty(&htim1, 0, 0, 0, 0);
}*/
}
if (rc_ctrl.rc.sw[0] == 2)
{
......@@ -234,10 +230,10 @@ int main(void)
/*Affichage de donnees sur le OLED*/
oled_clear(Pen_Clear);
oled_printf(1, 1, "M2006");
oled_printf(2, 1," Target: %f", gm6020_up.info.GM6020_info.angle);
oled_printf(3, 1," Speed: %i", gm6020_down.info.GM6020_info.angle);//info.M2006_info.speed
oled_printf(4, 1," Angle: %i", gm6020_up.info.GM6020_info.angle);
oled_printf(1, 1, "M3508");
oled_printf(2, 1," Target: %f", m3508_frontleft.target);
oled_printf(3, 1," Speed: %i", m3508_frontleft.info.M3508_info.speed);
oled_printf(4, 1," Angle: %i", m3508_frontleft.info.M3508_info.angle);
oled_refresh_gram();
// oled_clear(Pen_Clear);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment