void video_test() { //int i = 0, entries; //WEATHER_DATA data[DISPLAYED_DATA_SET_SIZE]; //GRAPH_DATA graph_data[DISPLAYED_DATA_SET_SIZE]; //char str[10]; // set background graphics_draw_rect(COLOR_LightCyan, 0, 0, RESOLUTION_WIDTH, RESOLUTION_HEIGHT); // set heading graphics_draw_string(COLOR_BlueViolet, 20, 70, "ooWeather powered by ..::OttOS::..", 3); // set current temperature graphics_draw_string(COLOR_BlueViolet, 10, 200, "Temperatur:", 2); // set current humidity graphics_draw_string(COLOR_BlueViolet, 10, 360, "Luftfeuchtigkeit:", 2); // set current barometric pressure graphics_draw_string(COLOR_BlueViolet, 10, 480, "Luftdruck:", 2); /* while (TRUE) { entries = read_weather_data(data, DISPLAYED_DATA_SET_SIZE); if (entries > 0) { // write current temperature value sprintf(str, "%2f °C\0", data[entries - 1].temp); graphics_draw_string(COLOR_DarkSlateGray, 200, 160, str, 2); sprintf(str, "%2f %\0", data[entries - 1].humidity); graphics_draw_string(COLOR_DarkSlateGray, 200, 360, str, 2); sprintf(str, "%2f hPa\0", data[entries - 1].pressure); graphics_draw_string(COLOR_DarkSlateGray, 200, 480, str, 2); // draw the temperature graph //graphics_move_to(10, 300); //graphics_draw_graph(graph_data, 20, 1, 400, 680, COLOR_Lime, COLOR_Red); } else { // no data available } // pause for 1 minute, 10 seconds, 1 second??? } */ }
static void draw_mark(int x, int y, int width, int height, void *vp) { graphics_draw_circle(canvas, x, y, 10, 0xff00ff); graphics_draw_line(canvas, x - 15, y, x + 15, y, 0x00ffff); graphics_draw_line(canvas, x, y - 15, x, y + 15, 0x00ffff); graphics_draw_string(canvas, 50, 110, cal1, NULL, 0xffffff, 0); graphics_set_visible_canvas(display, canvas); }