jonfeldstein Posted July 23, 2003 Report Posted July 23, 2003 can anyone post a very very simple gauge that prints out a piece of data read from FSUIPC. It would be a great help thanks
jcboliveira Posted July 23, 2003 Report Posted July 23, 2003 FLOAT64 FSAPI fsacars_string1 ( PELEMENT_STRING pelement ) { DWORD dwResult; double weight; FLOAT64 val = pelement->source_var[0].var_value.n; FSUIPC_Read(0x30c0, 8, &weight, &dwResult); FSUIPC_Process(&dwResult); wsprintf(pelement->string, "%d", (int)weight); return val; } MAKE_STRING ( fsacars_string1, NULL, fsacars_fail, IMAGE_USE_ERASE | IMAGE_USE_BRIGHT | IMAGE_USE_TRANSPARENCY, 0, POSITION_X, POSITION_Y, SIZE_X, SIZE_Y, NUMCHARS, MODULE_VAR_NONE, MODULE_VAR_NONE, MODULE_VAR_NONE, RGB(250,250,250), RGB(0,0,0), RGB(92,92,92), GAUGE_FONT_DEFAULT, GAUGE_WEIGHT_DEFAULT, GAUGE_CHARSET, 0, DT_CENTER | DT_VCENTER | DT_SINGLELINE, NULL, fsacars_string1 ) Didn't test it but should work. POSITION_X, POSITION_Y, SIZE_X, SIZE_Y,NUMCHARS, are constants the name indicates what they do. Don't forget to put the FSUIPC init in the gauge callback and that the ini is to gauges and modules not for external programs . This only deals with the print not the all gauge. José
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now