|
Electronic Load
1.0
Programmable Constant Current Sink
|
Provides an input field for numerical Values. More...

Functions | |
| CONTROL_RET | EnterNumber (ctlEnterNumber_t *val, drawMode_t mode) |
| Enter a Number via Keyboard and/or Encoder. More... | |
| static void | EnterNumberDraw (ctlEnterNumber_t *val, drawMode_t mode) |
| Draws the Input Field. More... | |
| void | EnterNumberRestoreValue (ctlEnterNumber_t *val) |
| Restores the old Value of the Input Field Purpose is to reset it to the original value when the user exits the control with cancel. More... | |
| void | EnterNumberSaveValue (ctlEnterNumber_t *val) |
| Saves the Value of the Input Field Purpose is to reset it to the original value when the user exits the control with cancel. More... | |
| void | EnterNumberSetValue (ctlEnterNumber_t *ctl, double val) |
| Sets the Value. More... | |
Variables | |
| bool | cursorOn |
| True if the Cursor has to be displayed. More... | |
| uint8_t | cursorPos |
| Actual position of the Cursor (0=Left) More... | |
| static char | saveval [CONTROL_ENTER_NUMBER_MAX_SIZE] |
Provides an input field for numerical Values.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
|
static |
Draws the Input Field.
| val | Pointer to enterNumber-struct |
| mode | Drawing mode. |


| void EnterNumberSaveValue | ( | ctlEnterNumber_t * | val | ) |
Saves the Value of the Input Field Purpose is to reset it to the original value when the user exits the control with cancel.
This function must be called when the user enters the control.
| val | Pointer to enterNumber-struct |
| void EnterNumberRestoreValue | ( | ctlEnterNumber_t * | val | ) |
Restores the old Value of the Input Field Purpose is to reset it to the original value when the user exits the control with cancel.
This function must be called when the user exits the control with the cancel key.
| val | Pointer to enterNumber-struct |

| CONTROL_RET EnterNumber | ( | ctlEnterNumber_t * | val, |
| drawMode_t | mode | ||
| ) |
Enter a Number via Keyboard and/or Encoder.
| val | Pointer to input data structure |
| mode | The draw mode |
The value-member must be set to a default value before calling this function. The value is a pattern consisting of digits and optionally a period. The length of the pattern is constant and the period cannot be moved. The period must not be the very first or last character! The user then may modify the value. If return is != CONTROL_ENTER the value should not be used since it may have been erroneously modified by the user.
If return is CONTROL_CHANGE you may process the change but should call the function again (with the same val) to allow the user to continue with his input.
To keep this function non-blocking it will return CONRTOL_NOTHING if no key- or encoder event is pending. Call it again as soon as you find time to until it returns CONTROL_ENTER or CONTROL_CANCEL. You can specify a change-callback function which is called every time the value is changed by the encoder.

| void EnterNumberSetValue | ( | ctlEnterNumber_t * | ctl, |
| double | val | ||
| ) |
Sets the Value.
| ctl | The address of the EnterNumber struct |
| val | The desired Value |
| bool cursorOn |
True if the Cursor has to be displayed.
| uint8_t cursorPos |
Actual position of the Cursor (0=Left)
|
static |
1.8.15