![]() |
Vivoe Lite 0.5.0
Lightweight GVA like HMI for military displays.
|
#include <cairo.h>
#include <ctype.h>
#include <gflags/gflags.h>
#include <glog/logging.h>
#include <gtk/gtk.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <ctime>
#include "hmicore/gva.h"
#include "hmicore/hmi_gva_helpers.h"
#include "hmicore/renderer_gva.h"
#include "hmicore/widgets/ai/object_localisation.h"
#include "hmicore/widgets/alarm_indicator.h"
#include "hmicore/widgets/bottom_labels.h"
#include "hmicore/widgets/driver/battery_bar.h"
#include "hmicore/widgets/driver/rpm_fuel.h"
#include "hmicore/widgets/driver/speedometer.h"
#include "hmicore/widgets/keyboard.h"
#include "hmicore/widgets/mode.h"
#include "hmicore/widgets/plan_position_indicator.h"
#include "hmicore/widgets/side_labels.h"
#include "hmicore/widgets/table/table.h"
#include "hmicore/widgets/top_labels.h"
#include "hmicore/widgets/widget_types.h"
#include "version.h"
Functions | |
DEFINE_string (path, ".", "Path to save images to") | |
Flag for path to images. | |
DEFINE_int32 (timeout, 1000, "Timeout in milliseconds between widget renders, 1 second if not specified.") | |
Flag for timeout in milliseconds. | |
DEFINE_int32 (id, 0, "The ID of the single widget to render from list below (timeout does not apply here):\n" " 0: PPI classic tank site, north facing site\n" " 1: PPI classic tank site, east facing site\n" " 2: PPI classic tank site, south facing site\n" " 3: PPI classic tank site, west facing site\n" " 4: PPI classic tank site with no site\n" " 5: PPI classic tank site with threats\n" " 6: PPI classic arrow site, north facing site\n" " 7: PPI classic arrow site, east facing site\n" " 8: PPI classic arrow site, south facing site\n" " 9: PPI classic arrow site, west facing site\n" " 10: PPI classic arrow site with no site\n" " 11: PPI classic arrow site, with threats site\n" " 12: PPI modern site, north facing site\n" " 13: PPI modern site, east facing site\n" " 14: PPI modern site, south facing site\n" " 15: PPI modern site, west facing site\n" " 16: PPI modern site with no site\n" " 17: PPI modern site with threats\n" " 18: Keyboard, lower case\n" " 19: Keyboard, upper case\n" " 20: Keyboard, numbers\n" " 21: Alarms indicator, advisory\n" " 22: Alarms indicator, warning\n" " 23: Alarms indicator, caution\n" " 24: Labels for top of screen, functional areas\n" " 25: Labels for bottom of screen, control\n" " 26: Labels for side of screen, used for both left and right hand sides\n" " 27: Operator mode, visual indication of the non operational mode/s\n" " 28: Table example, example message box/s\n" " 29: Table example, sample alarms/s\n" " 30: Drivers speed dial/s 10Kph\n" " 31: Drivers speed dial/s 40Kph\n" " 32: Drivers speed dial/s 100Kph\n" " 33: RPM 0\n" " 34: RPM 4000\n" " 35: Oject localisation people") | |
Flag for widget ID to render. | |
int | gtk_destory_callback (GtkWidget *widget, gpointer data) |
Construct a new gtk destory callback object. | |
int | main (int argc, char *argv[]) |
The main entry point for the widget tester application. | |
Variables | |
const uint32_t | kScreenHeight = 480 |
The Screen height. | |
const uint32_t | kScreenWidth = 640 |
The Screen width. | |
std::string | path |
Save path. | |
std::array< gva::WidgetPlanPositionIndicator::ThreatType, 5 > | threats |
Array of threats. | |
from the command line using the following to get help:
This program will loop through all images displaying them on the screen, each image will also be written to disk as a .png file with a transparent background. These images are the ones included in the doxygen user documentation.
To use this program for testing you can view a single image using its ID. IDs are listed when you run with the -h help option.
The above PPI (Plan Position Indicator) has the ID of 0 and so can be viewed using the command line below:
The resulting output image will be placed in the /tmp directory.
To generate all the images you can cycle through all IDs by running the command:
Widgets will be displayed every 500 milliseconds on the screen until all images have been displayed. By not specifying an ID we get all the images, the default timeout to 1 second. All images for all widgets will be placed in the ./images folder
int gtk_destory_callback | ( | GtkWidget * | widget, |
gpointer | data | ||
) |
Construct a new gtk destory callback object.
widget | |
data |
int main | ( | int | argc, |
char * | argv[] | ||
) |
The main entry point for the widget tester application.
argc | |
argv |