Compare commits

..

No commits in common. "666ed16115e0f98dc738105ee93457aed84c9a3d" and "657235f68ee7ae228ff8f235fc858fdd593ca97c" have entirely different histories.

18 changed files with 489 additions and 464 deletions

View file

@ -402,6 +402,22 @@
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>40</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134223706</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\Services\RFInput.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\NUCLEO_F103RB\../Services/RFInput.c\40</Expression>
</Bp>
<Bp>
<Number>1</Number>
<Type>0</Type>
<LineNumber>71</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
@ -416,7 +432,7 @@
<Expression></Expression>
</Bp>
<Bp>
<Number>1</Number>
<Number>2</Number>
<Type>0</Type>
<LineNumber>46</LineNumber>
<EnabledFlag>1</EnabledFlag>
@ -612,7 +628,7 @@
<GroupNumber>2</GroupNumber>
<FileNumber>7</FileNumber>
<FileType>1</FileType>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\Services\Accelerometer.c</PathWithFileName>

View file

@ -1,6 +1,6 @@
/**
******************************************************************************
* @file Accelerometer.h
* @file RFOutput.h
* @author GALLOIS, Leonie and GÜLDENSTEIN, Jasper and FOUSSATS, Morgane
* @brief Service for reading the analog signals of the Accelerometer.
******************************************************************************

View file

@ -32,6 +32,7 @@ void ALIMENTATION_Init(void){
adcReg.ContinuousMode = LL_ADC_REG_CONV_SINGLE;
adcReg.DMATransfer = LL_ADC_REG_DMA_TRANSFER_NONE;
LL_ADC_REG_Init(ADC1, &adcReg);
LL_ADC_Enable(ADC1);
}

View file

@ -1,8 +1,8 @@
/**
******************************************************************************
* @file Alimentation.h
* @file RFOutput.h
* @author GALLOIS, Leonie and GÜLDENSTEIN, Jasper and FOUSSATS, Morgane
* @brief Service for reading the voltage of the power supply/battery.
* @brief Service for using the RF Module to transmit characters.
******************************************************************************
*/
#ifndef ALIMENTATION_H

View file

@ -80,12 +80,15 @@ void INCR_ENCODER_Init(void){
// enable interrupt from exti in NVIC
NVIC_SetPriority(EXTI9_5_IRQn, 12); // prio??
NVIC_EnableIRQ(EXTI9_5_IRQn);
}
void EXTI9_5_IRQHandler(void){
index_passed = 1;
// reset counter = encoder position to 0 position
LL_TIM_WriteReg(TIM3,CNT,0);
// clear pending (EXTI necessary ?)
LL_EXTI_ClearFlag_0_31(LL_EXTI_LINE_5);
NVIC_ClearPendingIRQ(EXTI9_5_IRQn);

View file

@ -34,6 +34,7 @@ void RF_INPUT_Init(void)
LL_TIM_Init(TIM4, &tim4_init_struct);
// setup channel 1 to capture period of pwm
LL_TIM_IC_InitTypeDef tim4_ic_conf;
tim4_ic_conf.ICPolarity= LL_TIM_IC_POLARITY_RISING;

View file

@ -2,7 +2,7 @@
******************************************************************************
* @file RFInput.h
* @author CAVAILLES, Kevin and GÜLDENSTEIN, Jasper
* @brief Service for reading a PWM signal from an RF remote
* @brief Service for reveiving a PWM signal from an RF remote
******************************************************************************
*/
#ifndef RF_INPUT_H

View file

@ -9,9 +9,11 @@ char RF_OUTPUT_buf[100];
void RF_OUTPUT_Init(void){
LL_USART_InitTypeDef My_LL_Usart_Init_Struct;
LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_USART1);
LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_GPIOA);
LL_GPIO_InitTypeDef tx;
tx.Mode = LL_GPIO_MODE_ALTERNATE;
tx.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
@ -28,7 +30,6 @@ void RF_OUTPUT_Init(void){
LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_GPIOA);
LL_USART_InitTypeDef My_LL_Usart_Init_Struct;
My_LL_Usart_Init_Struct.BaudRate = 9600;
My_LL_Usart_Init_Struct.DataWidth = LL_USART_DATAWIDTH_8B ;
My_LL_Usart_Init_Struct.HardwareFlowControl = LL_USART_HWCONTROL_NONE;
@ -39,9 +40,11 @@ void RF_OUTPUT_Init(void){
LL_USART_Init(USART1,&My_LL_Usart_Init_Struct);
LL_USART_Enable(USART1);
}
}
void RF_OUTPUT_SendBytes(char* buf, int len){
LL_GPIO_SetOutputPin(GPIOA,LL_GPIO_PIN_11);
for(int i = 0; i < len; i++){
LL_USART_TransmitData8(USART1, buf[i]);

View file

@ -2,7 +2,7 @@
******************************************************************************
* @file Sail.h
* @author CAVAILLES, Kevin and GÜLDENSTEIN, Jasper
* @brief Service for functions relating to the Sail of the Sailboat.
* @brief Service for using the RF Module to transmit characters.
******************************************************************************
*/
#ifndef SAIL_H

View file

@ -46,6 +46,7 @@ void SERVO_Init(void){
LL_TIM_EnableCounter(TIM1);
}
void SERVO_SetAngle(int angle){