Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

USART is UART with Sync option, meaning you can utilize a clock as a reference frame for data.

DMA Configuration

...

Removal of Singleton Structure

Get instance - gets a single instance of a class

→ is used when calling a function in a class that returns a pointer value (. would be used for non-pointer values)
extern - allows class access globally

How to create a global class (variable)

config.hpp

extern className* object;

config.cpp

...

className object_instance (&protocolName);

className* object = &object_instance;

Getting Code Running

...

Getting Code Running

Add these lines of your code to main.cpp.

Code Block
languagecpp
/* USER CODE BEGIN 2 */
  SBus sbus_data;
  RCControl control_data;
  /* USER CODE END 2 */

  /* Infinite loop */
  /* USER CODE BEGIN WHILE */
  while (1)
  {
    /* USER CODE END WHILE */
  	sbus_data = sbus_pointer->GetSBUS();
  	control_data = sbus_pointer->GetRCControl();
  	/* USER CODE BEGIN 3 */
  }
Code Block
languagecpp
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "SBUSReceiver.hpp"
#include "RCReceiver_config.hpp"
/* USER CODE END Includes */

To Do

  •  Configure Nucleo pins
  •  Test data with a logic analyzer and RC controller
    •  Debug with interrupts
    •  Transmit receive signal to nucleo to check if the data is similar

...