Ajustements mineurs du code post merge
This commit is contained in:
parent
e15a62c76c
commit
89eebec4e3
5 changed files with 43 additions and 22 deletions
|
@ -400,7 +400,7 @@
|
|||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>1</BreakIfRCount>
|
||||
<Filename>..\MyDrivers\MyTimer.c</Filename>
|
||||
<Filename>C:\Users\Hp\Documents\ProjetVoilier\Projet_Voilier_4IR\MyDrivers\MyTimer.c</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression>\\NUCLEO_F103RB\../MyDrivers/MyTimer.c\99</Expression>
|
||||
</Bp>
|
||||
|
@ -646,6 +646,18 @@
|
|||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>2</GroupNumber>
|
||||
<FileNumber>10</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\Src\maths.c</PathWithFileName>
|
||||
<FilenameWithoutPath>maths.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
|
@ -656,7 +668,7 @@
|
|||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>10</FileNumber>
|
||||
<FileNumber>11</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
|
@ -668,7 +680,7 @@
|
|||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>11</FileNumber>
|
||||
<FileNumber>12</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
|
@ -680,7 +692,7 @@
|
|||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>12</FileNumber>
|
||||
<FileNumber>13</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
|
@ -692,7 +704,7 @@
|
|||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>13</FileNumber>
|
||||
<FileNumber>14</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
|
@ -704,7 +716,7 @@
|
|||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>14</FileNumber>
|
||||
<FileNumber>15</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
|
@ -732,7 +744,7 @@
|
|||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>5</GroupNumber>
|
||||
<FileNumber>15</FileNumber>
|
||||
<FileNumber>16</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
|
@ -752,7 +764,7 @@
|
|||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>6</GroupNumber>
|
||||
<FileNumber>16</FileNumber>
|
||||
<FileNumber>17</FileNumber>
|
||||
<FileType>2</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<TargetName>NUCLEO-F103RB</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
|
@ -432,6 +432,11 @@
|
|||
<FileType>1</FileType>
|
||||
<FilePath>..\Src\MyTimer.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>maths.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\Src\maths.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
|
@ -918,6 +923,11 @@
|
|||
<FileType>1</FileType>
|
||||
<FilePath>..\Src\MyTimer.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>maths.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\Src\maths.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
|
|
14
Src/Voile.c
14
Src/Voile.c
|
@ -6,20 +6,20 @@
|
|||
#include "stm32f1xx_ll_system.h" // utile dans la fonction SystemClock_Config
|
||||
#include "stm32f1xx_ll_tim.h"
|
||||
#include "stm32f1xx_ll_bus.h"
|
||||
#include "stdlib.h" //Remplacer par maths.h quand on va tout faire marcher.
|
||||
#include "maths.h" //Remplacer par maths.h quand on va tout faire marcher.
|
||||
|
||||
#define ARR (19999)
|
||||
#define PSC (71)
|
||||
#define Timer (TIM1)
|
||||
#define channel (1)
|
||||
#define coefa (2)
|
||||
#define coefb (1)
|
||||
#define coefc (2)
|
||||
#define coefd (1)
|
||||
#define coefa (1)
|
||||
#define coefb (0)
|
||||
#define coefc (1)
|
||||
#define coefd (0)
|
||||
|
||||
int angleVoileActuel = 0; //angle de la voile. Mis à jour quans on la tend. de 0 à 45.
|
||||
|
||||
void ConfVoile(){
|
||||
void ConfVoile(void){
|
||||
LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_GPIOA);
|
||||
MyTimer_Conf(Timer,ARR,PSC);
|
||||
LL_GPIO_SetPinMode(GPIOA,LL_GPIO_PIN_8,LL_GPIO_MODE_ALTERNATE);
|
||||
|
@ -39,7 +39,7 @@ int RecupTension(void){
|
|||
|
||||
|
||||
int CalculerTension(int alpha){
|
||||
if (0 < abs(alpha) && abs(alpha) > 45){
|
||||
if (abs(alpha) > 45){
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "MyTimer.h"
|
||||
|
||||
|
||||
void ConfVoile();
|
||||
void ConfVoile(void);
|
||||
|
||||
|
||||
char * ToString(int theta) ;
|
||||
|
|
|
@ -61,10 +61,10 @@ void SystemClock_Config(void)
|
|||
*/
|
||||
void Setup(){
|
||||
SystemClock_Config();
|
||||
ConfAntiChavirement();
|
||||
//ConfAntiChavirement();
|
||||
ConfAllure();
|
||||
ConfVoile();
|
||||
ConfGouvernail();
|
||||
//ConfGouvernail();
|
||||
|
||||
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ void Background(){
|
|||
TendreVoile(tensionVoile); //on tend la voile grâce à la tension obtenue
|
||||
|
||||
//Gouvernail
|
||||
int valeurTelecommande = LireTelecommande(); //on lit la valeur renvoyée par la télécommande
|
||||
/*int valeurTelecommande = LireTelecommande(); //on lit la valeur renvoyée par la télécommande
|
||||
int vitesse = CalculerVitesse(valeurTelecommande);//gràace à la valeur de la telecommande on calcule la vitesse souhaitée
|
||||
CommanderMoteur(vitesse);//On commande le moteur pour aller à la vitesse voulue
|
||||
|
||||
|
@ -107,7 +107,7 @@ void Background(){
|
|||
int danger = CalculerDanger(rouli);//renvoi boolean : int à 0 si faux et 1 si vrai
|
||||
if(danger){
|
||||
TendreVoile(90); //si il y a danger on relache les voiles (relacher les voiles = les mettre à 90)
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
|
@ -116,5 +116,4 @@ int main(){
|
|||
while(1){
|
||||
Background();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue