|
PS5 Barcode scanner
|
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <ctype.h>#include <stdarg.h>#include <limits.h>#include <setjmp.h>#include "lib.h"#include "gps.h"#include "menu.h"#include "main.h"#include "utils.h"#include "fnt\\battery.fnt"#include "fnt\\numrev.fnt"Data Structures | |
| struct | TIMER_STRUCT |
Macros | |
| #define | SCREEN_DUMP "~src.tmp" |
| #define | BAT_CHARGE 1 |
| #define | BAT_NO_CHARGE 0 |
Functions | |
| int | IsScannerGPS (void) |
| Checks if the scanner has GPS and it is actively being polled. | |
| int | IsScannerBluetooth (void) |
| Checks if the scanner implements bluetooth. | |
| int | UpdateBluetoothState (int *stateChange) |
| Bluetooth stat machine. | |
| void | ServiceBreadCrumbTimer (void) |
| void | GPSService (void) |
| GPS radio polling service. | |
| int | check_timeout (void) |
| Check if the general timer has expired. | |
| void | restore_font (int width, int height) |
| Restores font based on fint size set. | |
| void | display_icon (int x, int y, int state) |
| Displays icon store in flash at x, y, submitted. | |
| void | check_batt_empty (void) |
| Checks battery status. | |
| int | KAwaitkey (int bat_type) |
| Wait key depending on battery type. | |
| void | empty_batt_beep (void) |
| Bettery low beep. | |
| void | display_battery_txt_msg (int empty) |
| Displays battery charge message. | |
| void | show_empty_batt_msg (int empty) |
| void | display_rev_voltage (int x, int y, unsigned int voltage) |
| Displays voltage in battery icon with shadow. | |
| void | is_on_cradle (void) |
| Tests for charging and displays battery icon when charging. | |
| void | draw_bar (int x_pos, int y_pos, int width, int height, int color) |
| Draws a bar with submitted specification. | |
| void | info_sound (void) |
| Sounds information beep. | |
| void | keybeeplow (void) |
| Sounds low volume key beep. | |
| void | keybeep (void) |
| Sounds normal volume key beep. | |
| void | errkeybeep (void) |
| Sounds key error beep. | |
| void | okbeep (void) |
| Sounds okay beep. | |
| void | errbeep (void) |
| Sounds error beep. | |
| int | waitkey (void) |
| int | waitkey_no_charge (void) |
| int | KACheckKey (void) |
| void | rectangle (int x1, int y1, int x2, int y2, int color) |
| Draws a rectangle with submitted specifications. | |
| void | rectangle3d (int x1, int y1, int x2, int y2, int color) |
| Draws a rectangle with shadowing to submitted specifications. | |
| void | rectangle3drev (int x1, int y1, int x2, int y2, int color) |
| Draws a rectangle with upward shadowing to submitted specifications. | |
| int | ScanBarcode (char *string, int min_length, int max_length, int *code_id) |
| int | composite_post_processing (struct barcode *code, struct barcode *prev_code, unsigned long *time_out_value, short reset_time) |
| int | what_day_of_week (void) |
| int | KeyboardBarcode (char *string, int min_length, int max_length, int typ, int x, int y, int num,...) |
| Displays key entry with backspace processing until a special key is entered. | |
| int | ScanOrKeyboardInput (char *string, int min_length, int max_length, int typ, int x, int y, int offset) |
| int | KeyboardQuantity (char *string, int max_length, int typ, int x, int y, int offset, long def_val, int max_x_d, int rect, int num,...) |
| Quantity entry and display. | |
| int | CheckTimerExpired (int nTimerID) |
| Checks if the specified timer has expired. | |
| int | CheckMyTimer (int nTimerID) |
| int | StartMyTimer (int nTimerID, unsigned long nDuration, int fAutoRestart) |
| Starts the specified timer with the duration and auto restart. | |
| int | StopMyTimer (int nTimerID) |
| Stops the specified timer. | |
| void | InitializeMyTimer (void) |
| Stops all timers. | |
| void | ResetMyTimer (int nTimerID) |
| Resets the specified timer to its full duration. | |
| void | PokeActivity (void) |
| Resets the autopower down timer. | |
| void | PauseMyTimer (int nTimerID) |
| Pauses the specified timer. | |
| void | ResumeMyTimer (int nTimerID) |
| Resumes the specified timer. | |
| void | set_font_menu (void) |
| Sets font and cursor for menus. | |
| void | set_font_input (void) |
| Sets font and cursor for input. | |
| void | clear_screen (void) |
| Clears the screen. | |
Variables | |
| int | batt_power |
| int | battery_msg_status |
| int | battery_type |
| int | menu_state |
| int | IN_MENU_MODE |
| int | NOT_IN_MENU_MODE |
| int | EXITING_MENU_MODE |
| int | prefix |
| int | suffix |
| int | BTStateChange |
| scannerType | scanner |
| int | g_util_timer |
| int | g_util_timeout |
| int | g_gps_mode |
| TIMER_STRUCT | rgTimers [TIMER_ID_MAX+1] |
| #define BAT_CHARGE 1 |
| #define BAT_NO_CHARGE 0 |
| #define SCREEN_DUMP "~src.tmp" |
| void check_batt_empty | ( | void | ) |
Checks battery status.
| int check_timeout | ( | void | ) |
Check if the general timer has expired.
| int CheckMyTimer | ( | int | nTimerID | ) |
| int CheckTimerExpired | ( | int | nTimerID | ) |
Checks if the specified timer has expired.
F
| void clear_screen | ( | void | ) |
Clears the screen.
| int composite_post_processing | ( | struct barcode * | code, |
| struct barcode * | prev_code, | ||
| unsigned long * | time_out_value, | ||
| short | reset_time ) |
| void display_battery_txt_msg | ( | int | empty | ) |
Displays battery charge message.
| void display_icon | ( | int | x, |
| int | y, | ||
| int | state ) |
Displays icon store in flash at x, y, submitted.
| void display_rev_voltage | ( | int | x, |
| int | y, | ||
| unsigned int | voltage ) |
Displays voltage in battery icon with shadow.
| void draw_bar | ( | int | x_pos, |
| int | y_pos, | ||
| int | width, | ||
| int | height, | ||
| int | color ) |
Draws a bar with submitted specification.
| void empty_batt_beep | ( | void | ) |
Bettery low beep.
| void errbeep | ( | void | ) |
Sounds error beep.
| void errkeybeep | ( | void | ) |
Sounds key error beep.
|
extern |
GPS radio polling service.
| void info_sound | ( | void | ) |
Sounds information beep.
| void InitializeMyTimer | ( | void | ) |
Stops all timers.
| void is_on_cradle | ( | void | ) |
Tests for charging and displays battery icon when charging.
|
extern |
Checks if the scanner implements bluetooth.
|
extern |
Checks if the scanner has GPS and it is actively being polled.
| int KACheckKey | ( | void | ) |
| int KAwaitkey | ( | int | bat_type | ) |
Wait key depending on battery type.
| void keybeep | ( | void | ) |
Sounds normal volume key beep.
| void keybeeplow | ( | void | ) |
Sounds low volume key beep.
| int KeyboardBarcode | ( | char * | string, |
| int | min_length, | ||
| int | max_length, | ||
| int | typ, | ||
| int | x, | ||
| int | y, | ||
| int | num, | ||
| ... ) |
Displays key entry with backspace processing until a special key is entered.
| int KeyboardQuantity | ( | char * | string, |
| int | max_length, | ||
| int | typ, | ||
| int | x, | ||
| int | y, | ||
| int | offset, | ||
| long | def_val, | ||
| int | max_x_d, | ||
| int | rect, | ||
| int | num, | ||
| ... ) |
Quantity entry and display.
| void okbeep | ( | void | ) |
Sounds okay beep.
| void PauseMyTimer | ( | int | nTimerID | ) |
Pauses the specified timer.
| void PokeActivity | ( | void | ) |
Resets the autopower down timer.
| void rectangle | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2, | ||
| int | color ) |
Draws a rectangle with submitted specifications.
| void rectangle3d | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2, | ||
| int | color ) |
Draws a rectangle with shadowing to submitted specifications.
| void rectangle3drev | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2, | ||
| int | color ) |
Draws a rectangle with upward shadowing to submitted specifications.
| void ResetMyTimer | ( | int | nTimerID | ) |
Resets the specified timer to its full duration.
| void restore_font | ( | int | width, |
| int | height ) |
Restores font based on fint size set.
| void ResumeMyTimer | ( | int | nTimerID | ) |
Resumes the specified timer.
| int ScanBarcode | ( | char * | string, |
| int | min_length, | ||
| int | max_length, | ||
| int * | code_id ) |
| int ScanOrKeyboardInput | ( | char * | string, |
| int | min_length, | ||
| int | max_length, | ||
| int | typ, | ||
| int | x, | ||
| int | y, | ||
| int | offset ) |
|
extern |
| void set_font_input | ( | void | ) |
Sets font and cursor for input.
| void set_font_menu | ( | void | ) |
Sets font and cursor for menus.
| void show_empty_batt_msg | ( | int | empty | ) |
| int StartMyTimer | ( | int | nTimerID, |
| unsigned long | nDuration, | ||
| int | fAutoRestart ) |
Starts the specified timer with the duration and auto restart.
| int StopMyTimer | ( | int | nTimerID | ) |
Stops the specified timer.
|
extern |
Bluetooth stat machine.
| int waitkey | ( | void | ) |
| int waitkey_no_charge | ( | void | ) |
| int what_day_of_week | ( | void | ) |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
| int g_gps_mode |
| int g_util_timeout |
| int g_util_timer |
|
extern |
|
extern |
|
extern |
|
extern |
| TIMER_STRUCT rgTimers[TIMER_ID_MAX+1] |
|
extern |
|
extern |