WPILib  2014.0
WPIRoboticsLibraryforFRC
 All Classes Functions Variables Pages
DriverStationLCD.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) FIRST 2008. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
5 /*----------------------------------------------------------------------------*/
6 
7 #ifndef __DRIVER_STATION_LCD_H__
8 #define __DRIVER_STATION_LCD_H__
9 
10 #include "SensorBase.h"
11 
20 {
21 public:
22  static const uint32_t kSyncTimeout_ms = 20;
23  static const uint16_t kFullDisplayTextCommand = 0x9FFF;
24  static const int32_t kLineLength = 21;
25  static const int32_t kNumLines = 6;
26  enum Line {kMain_Line6=0, kUser_Line1=0, kUser_Line2=1, kUser_Line3=2, kUser_Line4=3, kUser_Line5=4, kUser_Line6=5};
27 
28  virtual ~DriverStationLCD();
29  static DriverStationLCD *GetInstance();
30 
31  void UpdateLCD();
32  void Printf(Line line, int32_t startingColumn, const char *writeFmt, ...);
33  void VPrintf(Line line, int32_t startingColumn, const char *writeFmt, va_list args);
34  void PrintfLine(Line line, const char *writeFmt, ...);
35  void VPrintfLine(Line line, const char *writeFmt, va_list args);
36 
37  void Clear();
38 
39 protected:
41 
42 private:
43  static void InitTask(DriverStationLCD *ds);
44  static DriverStationLCD *m_instance;
45  DISALLOW_COPY_AND_ASSIGN(DriverStationLCD);
46 
47  char *m_textBuffer;
48  SEM_ID m_textBufferSemaphore;
49 };
50 
51 #endif
52 
DriverStationLCD()
Definition: DriverStationLCD.cpp:25
void Clear()
Definition: DriverStationLCD.cpp:160
void UpdateLCD()
Definition: DriverStationLCD.cpp:63
void Printf(Line line, int32_t startingColumn, const char *writeFmt,...)
Definition: DriverStationLCD.cpp:78
Definition: SensorBase.h:20
Definition: DriverStationLCD.h:19
void PrintfLine(Line line, const char *writeFmt,...)
Definition: DriverStationLCD.cpp:123
static DriverStationLCD * GetInstance()
Definition: DriverStationLCD.cpp:51