| Wheelchair Control Diploma Thesis, Author: Ondrej Vozda, FEEC BUT, 2013

- Main Page
- Packages
- Classes
- Files

- Class List
- Class Index
- Class Members

All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Public Member Functions | Public Attributes | Protected Member Functions | Events | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
WheelchairControl.FormMain Class Reference

Main GUI form. More...

Inherits Form.

## Public Member Functions
delegate void | COMPortStatusChangedDelegate ()
| Delegate of method to be called when COM port status changes. More...
| FormMain ()
| Form Main constructor. More...

## Public Attributes
const Int32 | COM_PORT_STATUS_SAMPLING_PERIOD_MS = 500
| Com port status (open / closed) sampling period [ms]. More...
const Byte | RX_DATA_LENGTH = 4
| Command packet data length. More...

## Protected Member Functions
override void | Dispose (bool disposing)
| Clean up any resources being used. More...

## Events
static COMPortStatusChangedDelegate | COMStatusChanged
| Event invoked when COM port status changes. More...

## Private Types
enum | ComboboxControlIndexes : byte { MOMENT, SPEED_REGULATOR }
| Indexes of particular items in ComboboxMeansofControl. More...
enum | ComboboxUserInputIndexes : byte { JOYSTICK, WIFI }
| Indexes of particular items in ComboboxUserInput More...
enum | ComboboxDetectionMethodIndexes : byte { REFERENCE_HSV, SURF_DETECTOR }
| Enum to specify mark detection method. More...
enum | WorldMapRenderingModes : byte { HIGH_SPEED, HIGH_QUALITY, ANTIALIAS, NONE }
| Rendering modes of the world map. More...
enum | JoyAutoParkingSelesctionIndex : byte { JOYSTICK = 0, AUTOPARKING }
| Indexes of tabs in tabcontrol Joystick / Auto Parking More...
enum | MainPageTabsIndexes : byte { CAMERA, SETTINGS, LOG }
| Indexes of tabs in TabControlMain. More...
enum | DetectedMarksTransmit : byte { DONT_TRANSMIT, TRANSMIT }
| Enum to determine whether detected marks should be transmitted with the frame. More...
enum | PacketHeader : byte { WATCHDOG_NOP = 0xC0, JOYSTICK_COMMAND = 0xC1, STOP_BUTTON = 0xC2, START_BUTTON = 0xC3, AUTO_PARKING_START_BUTTON = 0xC4, CAMERA_FRAME_REQUEST = 0xC5, USER_RESPONSE = 0xC6, AUTOPARKING_PHASE = 0xC7, CAMERA_FRAME_RESPONSE = 0xD0, CAMERA_FRAME_TO_BE_CONFIRMED = 0xD1 }
| Enum to determine UDP packet message header type. More...
enum | OdometryPacketByte : byte { X_BASE = 0, Y_BASE = 2, PHI_BASE = 4, SRF08_FRONT_DIST = 6, SRF08_REAR_DIST = 7, ENABLE_POSITION_REGULATOR = 8, ENABLE_WALL_FOLLOWING = 9 }
| Bytes' indexes in odometry status packet. More...
enum | MapReferenceCoordinates : byte { MARKS_CENTER, WHEELCHAIR_CENTER }
| Enum to determine index in comboboxReferenceCoordinates. More...
enum | RxReturnCodes : byte { TRANSMISSION_OK, PORT_CLOSED, PACKET_INCOMPLETE, WRONG_CHECKSUM }
| Enum to specify return codes of UARTreceive(). More...

## Private Member Functions
void | LoadCalibrationCoordinates ()
| Loads coordinates of calibration points from the storage. More...
void | UDPDataReceiver ()
| Function to be run in separate thread and receive data via UDP. More...
void | SendStopSequence ()
| Sends stop sequence repeately to stop motors. STOP_REQUEST_REPEATS More...
void | ResetOdometry ()
| Reset odometry coordinates. More...
void | VisualizePhase (WheelchairModel.AutoParkingPhase phase, Boolean isError)
| Visualize current phase. More...
void | UARTsend (UInt32[] data)
| Sends data via UART. More...
void | Timestamp ()
| Log actual time. More...
Int32 | UARTreceive (Byte instruction, ref Byte[] outBuffer)
| Reads controller configuration via UART. More...
bool | JoystickXinThreshold (Int32 X)
| Determine whether X axis' value lies within borders. More...
bool | JoystickYinThreshold (Int32 Y)
| Determine whether Y axis' value lies within borders. More...
void | SendCommandsToMotors (Int32 X, Int32 Y, Int32 Z)
| Calculates values to be sent to motors using X,Y,Z coordinates. More...
void | AutoParkingThreadMethod ()
| Method o be run in a separated thread and perform auto parking algorithm. More...
void | FormMain_COMStatusChanged ()
| Com status changed event handler. More...
void | ApplicationExit_EventHandler (object sender, EventArgs e)
| Handler called when application exits. More...
void | InitializeComponent ()
| Required method for Designer support - do not modify the contents of this method with the code editor. More...
Boolean | RecalculateRefPointToMarksCenter (ref Double X, ref Double Y, out Double Phi)
| Racalculates coordinates from wheelchair's center reference frame to reference frame of marks center. More...
Byte | AutoDetectReferenceHue (Image< Bgr, Byte > modelImage)
| Tries to detect reference hue of model image automatically. More...
void | ImageGrabbed_EventHandler (object sender, EventArgs e)
| Handler called when capture grabs image from camera. More...
void | MarkLock_ThreadRoutine (Boolean resetCounters)
| Routine to detect marks. Run in separate thread. More...
void | DrawWorldMap ()
| Draw world map to the picturebox. More...
void | CalibratePointsMouseClickRoutine (MouseEventArgs e)
| Routine for mouse click when point calibration tab is selected. More...
void | SelectColorMouseClickRoutine (MouseEventArgs e)
| Routine for mouse click when color calibration tab is selected. More...

## Static Private Member Functions
static void | COMPortStatusGuard_Method (FormMain form)
| Method to be invoked by COMPortStatusGuard thread. Supposed to invoke events when Port.IsOpen sttribute changes. More...

## Private Attributes
const Byte | JOYSTICK_RANGE = 255
| Joystick maximal value. More...
const Int32 | UART_RX_TIMEOUT_MS = 50
| Uart timeout [ms] More...
const Int32 | WIFI_WATCHDOG_TIMEOUT_MS = 1000
| Wifi watchdog timeout [ms]. More...
const Byte | STOP_REQUEST_REPEATS = 3
| Stop command repeats. More...
const UInt16 | UDP_PORT = 50005
| Random (not well-known) UDP port. More...
Thread | UDPreceiveThread
| Thread to be run separately and receive UDP communication asynchronously. More...
Thread | AutoParkingThread
| Thread to run auto parking algorithm. More...
IPEndPoint | ipEp = new IPEndPoint(IPAddress.Any, UDP_PORT)
| Shared IP Endpoint to receive from all IP addresses. More...
UdpClient | incomingUDPClient
| UDP client to receive data. More...
UdpClient | outgoingUDPClient
| UDP client to send data. More...
AutoResetEvent | arUserResponseTimout
| Auto reset event to wait for user response. More...
DateTime | swLogStartTime
| Log start time. More...
USB_Joystick | joystick
| Joystick instance. More...
Thread | threadCOMPortStatusGuard
| Thread to monitor COM port status and invoke ComStatusChanged event. More...
Boolean | portState = true
| State of COM port (open/closed). More...
Boolean | motorControlAllowed = false
| Flag to allow PC to control wheelchair's motors. More...
StreamWriter | swLogWriter
| Log memory stream writer. More...
Fake_USBJoystick | wifiJoy = new Fake_USBJoystick(JOYSTICK_RANGE / 2, JOYSTICK_RANGE / 2, 0)
| Fake joystick to simulate XYZ axes during WIFI drive. More...
System.ComponentModel.IContainer | components = null
| Required designer variable. More...
Capture | capture = new Capture()
| Camera capture. More...
FPS_Counter | fpsCounter = new FPS_Counter()
| Framerate counter. More...
CameraCalibrator | cameraCalibrator = new CameraCalibrator()
| Calibrator to calculate homography More...
MarksDetector | rightMarkDetector = new MarksDetector()
| Right mark detector. More...
MarksDetector | leftMarkDetector = new MarksDetector()
| Left mark detector. More...
FeatureDetector | featureDetectorLeft
| SURF feature detector to detect left mark. More...
FeatureDetector | featureDetectorRight
| SURF feature detector to detect right mark. More...
WorldMap | worldMap = new WorldMap()
| World map that contains informations about marks, car, platform etc. More...
HomographyMatrix | homMatWorldMapToWorld = new HomographyMatrix()
| Homography matrix for transformations from world map coordinates to real world coordinates. More...
HomographyMatrix | homMatWorldToPb
| Homography matrix for transformations from world coordinates to camera frame picturebox. More...
Image< Bgr, Byte > | lastCaptured
| Last captured image. More...
Image< Gray, Byte > | imageThresholdedLeft
| Image thresholded with left reference color. More...
Image< Gray, Byte > | imageThresholdedRight
| Image thresholded with right reference color. More...
Hsv | hsvSelectionLeft
| Left reference HSV color. More...
Hsv | hsvSelectionRight
| Right reference HSV color. More...
Point | leftDetectedMark
| Left mark detected by MarksDetector class. More...
Point | rightDetectedMark
| Right mark detected by MarksDetector class. More...
Object | marksLock = new Object()
| Lock to guarantee marks mutual exclusion. More...
WheelchairModel | wheelchairModel = new WheelchairModel()
| Wheelchair model (odometry etc.). More...

## Static Private Attributes
static Object | lockUart = new Object()
| UART send routine lock. More...

## Detailed Description

Main GUI form.

Main GUI form.

Image processing methods are separated in this file.

Definition at line 27 of file FormMain.cs.

## Member Enumeration Documentation

enum WheelchairControl.FormMain.ComboboxControlIndexes : byte
| private

Indexes of particular items in ComboboxMeansofControl.

Enumerator
MOMENT | Control moment using feedforward control.
SPEED_REGULATOR | Use speed regulator.

Definition at line 44 of file FormMain.cs.

enum WheelchairControl.FormMain.ComboboxDetectionMethodIndexes : byte
| private

Enum to specify mark detection method.

Enumerator
REFERENCE_HSV | Use reference HSV method to detect marks.
SURF_DETECTOR | Use Surface detector to detect marks.

Definition at line 76 of file FormMain.cs.

enum WheelchairControl.FormMain.ComboboxUserInputIndexes : byte
| private

Indexes of particular items in ComboboxUserInput

Enumerator
JOYSTICK | Joystick input index.
WIFI | Wifi input index.

Definition at line 60 of file FormMain.cs.

enum WheelchairControl.FormMain.DetectedMarksTransmit : byte
| private

Enum to determine whether detected marks should be transmitted with the frame.

Enumerator
DONT_TRANSMIT | Don't transmit marks flag.
TRANSMIT | Transmit marks flag.

Definition at line 155 of file FormMain.cs.

enum WheelchairControl.FormMain.JoyAutoParkingSelesctionIndex : byte
| private

Indexes of tabs in tabcontrol Joystick / Auto Parking

Enumerator
JOYSTICK | Joystick control tab.
AUTOPARKING | Autoparking tab.

Definition at line 118 of file FormMain.cs.

enum WheelchairControl.FormMain.MainPageTabsIndexes : byte
| private

Indexes of tabs in TabControlMain.

Enumerator
CAMERA | Camera tab index.
SETTINGS | Settings tab index.
LOG | Log tab index.

Definition at line 134 of file FormMain.cs.

enum WheelchairControl.FormMain.MapReferenceCoordinates : byte
| private

Enum to determine index in comboboxReferenceCoordinates.

Enumerator
MARKS_CENTER | Set center of marks as reference point.
WHEELCHAIR_CENTER | Set wheelchair center as reference point.

Definition at line 268 of file FormMain.cs.

enum WheelchairControl.FormMain.OdometryPacketByte : byte
| private

Bytes' indexes in odometry status packet.

Enumerator
X_BASE | X coordinate base index (X length = 2 bytes).
Y_BASE | Y coordinate base index (Y length = 2 bytes).
PHI_BASE | Phi coordinate base index (Phi length = 2 bytes).
SRF08_FRONT_DIST | SRF08 front distance.
SRF08_REAR_DIST | SRF08 rear distance.
ENABLE_POSITION_REGULATOR | Position regulator enable byte.
ENABLE_WALL_FOLLOWING | Wall-following regulatro enable byte.

Definition at line 227 of file FormMain.cs.

enum WheelchairControl.FormMain.PacketHeader : byte
| private

Enum to determine UDP packet message header type.

Enumerator
WATCHDOG_NOP | Empty packet to reset watchdog.
JOYSTICK_COMMAND | Artificial joystick data.
STOP_BUTTON | Press remote stop button.
START_BUTTON | Press remote start button.
AUTO_PARKING_START_BUTTON | Press auto parking start button remotely.
CAMERA_FRAME_REQUEST | Request to send camera frame.
USER_RESPONSE | User's confirmation of mark detection correctness.
AUTOPARKING_PHASE | Transmitt current auto parking phase.
CAMERA_FRAME_RESPONSE | Camera frame data packet.
CAMERA_FRAME_TO_BE_CONFIRMED | Camera frame with detected marks to be confirmed by user.

Definition at line 171 of file FormMain.cs.

enum WheelchairControl.FormMain.RxReturnCodes : byte
| private

Enum to specify return codes of UARTreceive().

Enumerator
TRANSMISSION_OK | Transmission was successful.
PORT_CLOSED | Error - port is closed.
PACKET_INCOMPLETE | Error - packet not complete.
WRONG_CHECKSUM | Error - packet checksum was wrong.

Definition at line 284 of file FormMain.cs.

enum WheelchairControl.FormMain.WorldMapRenderingModes : byte
| private

Rendering modes of the world map.

Enumerator
HIGH_SPEED | High speed mode.
HIGH_QUALITY | High quality mode.
ANTIALIAS | Antialiasing mode.
NONE | Default mode.

Definition at line 92 of file FormMain.cs.

## Constructor & Destructor Documentation

WheelchairControl.FormMain.FormMain | ( |  | ) |

Form Main constructor.

Definition at line 1499 of file FormMain.cs.

## Member Function Documentation

void WheelchairControl.FormMain.ApplicationExit_EventHandler | ( | object | sender,
|  | EventArgs | e
| ) |  |
| private

Handler called when application exits.

Parameters

  sender | Sender.
  e | Event arguments.

Definition at line 1473 of file FormMain.cs.

Byte WheelchairControl.FormMain.AutoDetectReferenceHue | ( | Image< Bgr, Byte > | modelImage | ) |
| private

Tries to detect reference hue of model image automatically.

Parameters

  modelImage | Image to be analyzed.

Returns
  Reference hue.

Definition at line 214 of file FormMainCV.cs.

void WheelchairControl.FormMain.AutoParkingThreadMethod | ( |  | ) |
| private

Method o be run in a separated thread and perform auto parking algorithm.

Definition at line 1057 of file FormMain.cs.

void WheelchairControl.FormMain.CalibratePointsMouseClickRoutine | ( | MouseEventArgs | e | ) |
| private

Routine for mouse click when point calibration tab is selected.

Parameters

  e | Mouse event arguments

Definition at line 704 of file FormMainCV.cs.

delegate void WheelchairControl.FormMain.COMPortStatusChangedDelegate | ( |  | ) |

Delegate of method to be called when COM port status changes.

static void WheelchairControl.FormMain.COMPortStatusGuard_Method | ( | FormMain | form | ) |
| static private

Method to be invoked by COMPortStatusGuard thread. Supposed to invoke events when Port.IsOpen sttribute changes.

Definition at line 1037 of file FormMain.cs.

override void WheelchairControl.FormMain.Dispose | ( | bool | disposing | ) |
| protected

Clean up any resources being used.

Parameters

  disposing | true if managed resources should be disposed; otherwise, false.

Definition at line 14 of file FormMain.Designer.cs.

void WheelchairControl.FormMain.DrawWorldMap | ( |  | ) |
| private

Draw world map to the picturebox.

Definition at line 407 of file FormMainCV.cs.

void WheelchairControl.FormMain.FormMain_COMStatusChanged | ( |  | ) |
| private

Com status changed event handler.

Definition at line 1427 of file FormMain.cs.

void WheelchairControl.FormMain.ImageGrabbed_EventHandler | ( | object | sender,
|  | EventArgs | e
| ) |  |
| private

Handler called when capture grabs image from camera.

Parameters

  sender | Sender.
  e | Event arguments.

Definition at line 227 of file FormMainCV.cs.

void WheelchairControl.FormMain.InitializeComponent | ( |  | ) |
| private

Required method for Designer support - do not modify the contents of this method with the code editor.

Definition at line 29 of file FormMain.Designer.cs.

bool WheelchairControl.FormMain.JoystickXinThreshold | ( | Int32 | X | ) |
| private

Determine whether X axis' value lies within borders.

Parameters

  X | X axis value.

Returns
  True if value lies within borders.

Definition at line 942 of file FormMain.cs.

bool WheelchairControl.FormMain.JoystickYinThreshold | ( | Int32 | Y | ) |
| private

Determine whether Y axis' value lies within borders.

Parameters

  Y | Y axis value.

Returns
  True if value lies within borders.

Definition at line 957 of file FormMain.cs.

void WheelchairControl.FormMain.LoadCalibrationCoordinates | ( |  | ) |
| private

Loads coordinates of calibration points from the storage.

Definition at line 427 of file FormMain.cs.

void WheelchairControl.FormMain.MarkLock_ThreadRoutine | ( | Boolean | resetCounters | ) |
| private

Routine to detect marks. Run in separate thread.

Parameters

  resetCounters | Reset detectors.

Definition at line 374 of file FormMainCV.cs.

Boolean WheelchairControl.FormMain.RecalculateRefPointToMarksCenter | ( | ref Double | X,
|  | ref Double | Y,
|  | out Double | Phi
| ) |  |
| private

Racalculates coordinates from wheelchair's center reference frame to reference frame of marks center.

Parameters

  X | X coordinate.
  Y | Y coordinate.
  Phi | Phi coordinate.

Returns
  True if succeedes.

Definition at line 138 of file FormMainCV.cs.

void WheelchairControl.FormMain.ResetOdometry | ( |  | ) |
| private

Reset odometry coordinates.

Definition at line 733 of file FormMain.cs.

void WheelchairControl.FormMain.SelectColorMouseClickRoutine | ( | MouseEventArgs | e | ) |
| private

Routine for mouse click when color calibration tab is selected.

Parameters

  e | Mouse event arguments

Definition at line 774 of file FormMainCV.cs.

void WheelchairControl.FormMain.SendCommandsToMotors | ( | Int32 | X,
|  | Int32 | Y,
|  | Int32 | Z
| ) |  |
| private

Calculates values to be sent to motors using X,Y,Z coordinates.

Parameters

  X | X joystick coordinate.
  Y | Y joystick coordinate.
  Z | Z joystick coordinate.

Definition at line 973 of file FormMain.cs.

void WheelchairControl.FormMain.SendStopSequence | ( |  | ) |
| private

Sends stop sequence repeately to stop motors. STOP_REQUEST_REPEATS

Definition at line 717 of file FormMain.cs.

void WheelchairControl.FormMain.Timestamp | ( |  | ) |
| private

Log actual time.

Definition at line 868 of file FormMain.cs.

Int32 WheelchairControl.FormMain.UARTreceive | ( | Byte | instruction,
|  | ref Byte[] | outBuffer
| ) |  |
| private

Reads controller configuration via UART.

Parameters

  instruction | Instruction code.
  outBuffer | Reference to data buffer.

Returns
  Status code (0 if succeedes).

Definition at line 879 of file FormMain.cs.

void WheelchairControl.FormMain.UARTsend | ( | UInt32[] | data | ) |
| private

Sends data via UART.

Parameters

  data | Data buffer to be sent.

Definition at line 822 of file FormMain.cs.

void WheelchairControl.FormMain.UDPDataReceiver | ( |  | ) |
| private

Function to be run in separate thread and receive data via UDP.

Definition at line 470 of file FormMain.cs.

void WheelchairControl.FormMain.VisualizePhase | ( | WheelchairModel.AutoParkingPhase | phase,
|  | Boolean | isError
| ) |  |
| private

Visualize current phase.

Parameters

  phase | Current phase.
  isError | True if error occured.

Definition at line 745 of file FormMain.cs.

## Member Data Documentation

AutoResetEvent WheelchairControl.FormMain.arUserResponseTimout
| private

Auto reset event to wait for user response.

Definition at line 378 of file FormMain.cs.

Thread WheelchairControl.FormMain.AutoParkingThread
| private

Thread to run auto parking algorithm.

Definition at line 358 of file FormMain.cs.

CameraCalibrator WheelchairControl.FormMain.cameraCalibrator = new CameraCalibrator()
| private

Calibrator to calculate homography

Definition at line 38 of file FormMainCV.cs.

Capture WheelchairControl.FormMain.capture = new Capture()
| private

Camera capture.

Definition at line 28 of file FormMainCV.cs.

const Int32 WheelchairControl.FormMain.COM_PORT_STATUS_SAMPLING_PERIOD_MS = 500

Com port status (open / closed) sampling period [ms].

Definition at line 34 of file FormMain.cs.

System.ComponentModel.IContainer WheelchairControl.FormMain.components = null
| private

Required designer variable.

Definition at line 8 of file FormMain.Designer.cs.

FeatureDetector WheelchairControl.FormMain.featureDetectorLeft
| private

SURF feature detector to detect left mark.

Definition at line 53 of file FormMainCV.cs.

FeatureDetector WheelchairControl.FormMain.featureDetectorRight
| private

SURF feature detector to detect right mark.

Definition at line 58 of file FormMainCV.cs.

FPS_Counter WheelchairControl.FormMain.fpsCounter = new FPS_Counter()
| private

Framerate counter.

Definition at line 33 of file FormMainCV.cs.

HomographyMatrix WheelchairControl.FormMain.homMatWorldMapToWorld = new HomographyMatrix()
| private

Homography matrix for transformations from world map coordinates to real world coordinates.

This is affine homography matrix, therefore there is no need to normalize coordinates of transformed point!

Definition at line 69 of file FormMainCV.cs.

HomographyMatrix WheelchairControl.FormMain.homMatWorldToPb
| private

Homography matrix for transformations from world coordinates to camera frame picturebox.

This is affine homography matrix, therefore there is no need to normalize coordinates of transformed point!

Definition at line 75 of file FormMainCV.cs.

Hsv WheelchairControl.FormMain.hsvSelectionLeft
| private

Left reference HSV color.

Definition at line 95 of file FormMainCV.cs.

Hsv WheelchairControl.FormMain.hsvSelectionRight
| private

Right reference HSV color.

Definition at line 100 of file FormMainCV.cs.

Image<Gray, Byte> WheelchairControl.FormMain.imageThresholdedLeft
| private

Image thresholded with left reference color.

Definition at line 85 of file FormMainCV.cs.

Image<Gray, Byte> WheelchairControl.FormMain.imageThresholdedRight
| private

Image thresholded with right reference color.

Definition at line 90 of file FormMainCV.cs.

UdpClient WheelchairControl.FormMain.incomingUDPClient
| private

UDP client to receive data.

Definition at line 368 of file FormMain.cs.

IPEndPoint WheelchairControl.FormMain.ipEp = new IPEndPoint(IPAddress.Any, UDP_PORT)
| private

Shared IP Endpoint to receive from all IP addresses.

Definition at line 363 of file FormMain.cs.

USB_Joystick WheelchairControl.FormMain.joystick
| private

Joystick instance.

Definition at line 388 of file FormMain.cs.

const Byte WheelchairControl.FormMain.JOYSTICK_RANGE = 255
| private

Joystick maximal value.

Definition at line 310 of file FormMain.cs.

Image<Bgr, Byte> WheelchairControl.FormMain.lastCaptured
| private

Last captured image.

Definition at line 80 of file FormMainCV.cs.

Point WheelchairControl.FormMain.leftDetectedMark
| private

Left mark detected by MarksDetector class.

Definition at line 105 of file FormMainCV.cs.

MarksDetector WheelchairControl.FormMain.leftMarkDetector = new MarksDetector()
| private

Left mark detector.

Definition at line 48 of file FormMainCV.cs.

Object WheelchairControl.FormMain.lockUart = new Object()
| static private

UART send routine lock.

Definition at line 403 of file FormMain.cs.

Object WheelchairControl.FormMain.marksLock = new Object()
| private

Lock to guarantee marks mutual exclusion.

Definition at line 115 of file FormMainCV.cs.

Boolean WheelchairControl.FormMain.motorControlAllowed = false
| private

Flag to allow PC to control wheelchair's motors.

Definition at line 408 of file FormMain.cs.

UdpClient WheelchairControl.FormMain.outgoingUDPClient
| private

UDP client to send data.

Definition at line 373 of file FormMain.cs.

Boolean WheelchairControl.FormMain.portState = true
| private

State of COM port (open/closed).

Definition at line 398 of file FormMain.cs.

Point WheelchairControl.FormMain.rightDetectedMark
| private

Right mark detected by MarksDetector class.

Definition at line 110 of file FormMainCV.cs.

MarksDetector WheelchairControl.FormMain.rightMarkDetector = new MarksDetector()
| private

Right mark detector.

Definition at line 43 of file FormMainCV.cs.

const Byte WheelchairControl.FormMain.RX_DATA_LENGTH = 4

Command packet data length.

Definition at line 39 of file FormMain.cs.

const Byte WheelchairControl.FormMain.STOP_REQUEST_REPEATS = 3
| private

Stop command repeats.

Definition at line 325 of file FormMain.cs.

DateTime WheelchairControl.FormMain.swLogStartTime
| private

Log start time.

Definition at line 383 of file FormMain.cs.

StreamWriter WheelchairControl.FormMain.swLogWriter
| private

Log memory stream writer.

Definition at line 413 of file FormMain.cs.

Thread WheelchairControl.FormMain.threadCOMPortStatusGuard
| private

Thread to monitor COM port status and invoke ComStatusChanged event.

Definition at line 393 of file FormMain.cs.

const Int32 WheelchairControl.FormMain.UART_RX_TIMEOUT_MS = 50
| private

Uart timeout [ms]

Definition at line 315 of file FormMain.cs.

const UInt16 WheelchairControl.FormMain.UDP_PORT = 50005
| private

Random (not well-known) UDP port.

Definition at line 330 of file FormMain.cs.

Thread WheelchairControl.FormMain.UDPreceiveThread
| private

Thread to be run separately and receive UDP communication asynchronously.

Definition at line 353 of file FormMain.cs.

WheelchairModel WheelchairControl.FormMain.wheelchairModel = new WheelchairModel()
| private

Wheelchair model (odometry etc.).

Definition at line 120 of file FormMainCV.cs.

const Int32 WheelchairControl.FormMain.WIFI_WATCHDOG_TIMEOUT_MS = 1000
| private

Wifi watchdog timeout [ms].

Definition at line 320 of file FormMain.cs.

Fake_USBJoystick WheelchairControl.FormMain.wifiJoy = new Fake_USBJoystick(JOYSTICK_RANGE / 2, JOYSTICK_RANGE / 2, 0)
| private

Fake joystick to simulate XYZ axes during WIFI drive.

Definition at line 418 of file FormMain.cs.

WorldMap WheelchairControl.FormMain.worldMap = new WorldMap()
| private

World map that contains informations about marks, car, platform etc.

Definition at line 63 of file FormMainCV.cs.

## Event Documentation

COMPortStatusChangedDelegate WheelchairControl.FormMain.COMStatusChanged
| static

Event invoked when COM port status changes.

Definition at line 344 of file FormMain.cs.

The documentation for this class was generated from the following files:

- C:/Users/Ondra/Desktop/Wheelchair Control/FormMain.cs
- C:/Users/Ondra/Desktop/Wheelchair Control/FormMain.Designer.cs
- C:/Users/Ondra/Desktop/Wheelchair Control/FormMainCV.cs