PER Firmware
Loading...
Searching...
No Matches
lcd.c File Reference

LCD display management. More...

#include "lcd.h"
#include <stddef.h>
#include <stdint.h>
#include "common/nextion/nextion.h"
#include "common/phal_G4/usart/usart.h"
#include "pages/race.h"
#include "pages/calibration.h"
#include "pages/faults.h"
#include "pages/amk.h"
#include "pages/vcu.h"
Include dependency graph for lcd.c:

Functions

 ALLOCATE_STRBUF (lcd_tx_buf, 2048)
 
void LCD_init (uint32_t baud_rate)
 
void LCD_tx_update (void)
 Called periodically to send commands to the Nextion LCD display via USART.
 
void advancePage ()
 Advances to the next selectable page.
 
void backPage ()
 Moves to the previous selectable page.
 
void updatePage ()
 Updates LCD display page.
 
void moveUp ()
 
void moveDown ()
 
void selectItem ()
 
void updateTelemetryPages ()
 Updates current telemetry page by calling its handler if available.
 

Variables

volatile page_t curr_page = PAGE_PREFLIGHT
 
volatile page_t prev_page = PAGE_PREFLIGHT
 
const page_handler_t page_handlers [NUM_PAGES]
 

Detailed Description

LCD display management.

Author
Irving Wang (irvin.nosp@m.gw@p.nosp@m.urdue.nosp@m..edu)

Function Documentation

◆ advancePage()

void advancePage ( void )

Advances to the next selectable page.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ALLOCATE_STRBUF()

ALLOCATE_STRBUF ( lcd_tx_buf ,
2048  )

◆ backPage()

void backPage ( void )

Moves to the previous selectable page.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LCD_init()

void LCD_init ( uint32_t baud_rate)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LCD_tx_update()

void LCD_tx_update ( void )

Called periodically to send commands to the Nextion LCD display via USART.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ moveDown()

void moveDown ( void )
Here is the caller graph for this function:

◆ moveUp()

void moveUp ( void )
Here is the caller graph for this function:

◆ selectItem()

void selectItem ( void )
Here is the caller graph for this function:

◆ updatePage()

void updatePage ( void )

Updates LCD display page.

Key behaviors:

  • Maintains display of error pages when active
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateTelemetryPages()

void updateTelemetryPages ( void )

Updates current telemetry page by calling its handler if available.

Here is the caller graph for this function:

Variable Documentation

◆ curr_page

volatile page_t curr_page = PAGE_PREFLIGHT

◆ page_handlers

const page_handler_t page_handlers[NUM_PAGES]

◆ prev_page

volatile page_t prev_page = PAGE_PREFLIGHT