Round Dial

Microchip Graphics Library

Microchip Graphics Library
Round Dial

Dial supports only Touchscreen inputs, replying to their events with the following messages: 

1. RD_MSG_CLOCKWISE - When movement of the touch is in the face of the dial and in the clockwise direction. 

2. RD_MSG_CTR_CLOCKWISE - When movement of the touch is in the face of the dial and in the counter clockwise direction. 

 

The Dial object is rendered using the assigned style scheme. The following figure illustrates the color assignments. 

 

 

Functions
 
Name 
Description 
 
This function creates a ROUNDDIAL object with the parameters given. It automatically attaches the new object into a global linked list of objects and returns the address of the object. 
 
This function renders the object on the screen using the current parameter settings. Location of the object is determined by the center (x,y) postion and the radius parameters. The colors used are dependent on the state of the object.
When rendering objects of the same type, each object must be rendered completely before the rendering of the next object is started. This is to avoid incomplete object rendering. 
 
This function performs the actual state change based on the translated message given. The following state changes are supported:  
 
This function evaluates the message from a user if the message will affect the object or not. The table below enumerates the translated messages for each event of the touch screen inputs.
 
Macros
Name 
Description 
Used to directly increment the value. The delta change used is the resolution setting (res). 
Used to directly decrement the value. The delta change used is the resolution setting (res). 
Returns the current dial value. Value is always in the 0-max range inclusive. 
Sets the value to the given new value. Value set must be in 0-max range inclusive. 
Structures
Name 
Description 
Defines the parameters required for a dial Object. The curr_xPos, curr_yPos, new_xPos and new_yPos parameters are internally generated to aid in the redrawing of the dial. User must avoid modifying these values. 
Topics
Name 
Description 
List of Dial bit states. 
Links
Microchip Graphics Library Version 3.06.02 - October 15, 2012
Copyright © 2012 Microchip Technology, Inc.  All rights reserved