]> Pileus Git - aweather/blobdiff - src/plugins/radar.c
Update for libgis
[aweather] / src / plugins / radar.c
index 1737fec2b5daabca12668f326856dfa6e62b8a9a..4efa6cb57a126a408ed0102d078cb67283340286 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009 Andy Spencer <spenceal@rose-hulman.edu>
+ * Copyright (C) 2009-2010 Andy Spencer <andy753421@gmail.com>
  *
  * 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
@@ -23,7 +23,7 @@
 #include <math.h>
 #include <rsl.h>
 
-#include <gis/gis.h>
+#include <gis.h>
 
 #include "radar.h"
 #include "marching.h"
@@ -56,7 +56,7 @@ static void _bscan_sweep(GisPluginRadar *self, Sweep *sweep, colormap_t *colorma
                        buf[buf_i+0] = colormap->data[val][0];
                        buf[buf_i+1] = colormap->data[val][1];
                        buf[buf_i+2] = colormap->data[val][2];
-                       buf[buf_i+3] = colormap->data[val][3]; // TESTING
+                       buf[buf_i+3] = colormap->data[val][3]*0.75; // TESTING
                        if (val == BADVAL     || val == RFVAL      || val == APFLAG ||
                            val == NOTFOUND_H || val == NOTFOUND_V || val == NOECHO) {
                                buf[buf_i+3] = 0x00; // transparent
@@ -491,6 +491,8 @@ static void _on_location_changed(GisViewer *viewer,
 static gpointer _draw_radar(GisCallback *callback, gpointer _self)
 {
        GisPluginRadar *self = GIS_PLUGIN_RADAR(_self);
+
+       /* Draw wsr88d */
        if (self->cur_sweep == NULL)
                return NULL;
        g_debug("GisPluginRadar: _draw_radar");
@@ -645,13 +647,11 @@ GisPluginRadar *gis_plugin_radar_new(GisViewer *viewer, GisPrefs *prefs)
        }
 
        /* Add renderers */
-       GisCallback *callback;
-
-       callback = gis_callback_new(_draw_radar, self);
-       gis_viewer_add(viewer, GIS_OBJECT(callback), GIS_LEVEL_WORLD, TRUE);
+       GisCallback *radar_cb = gis_callback_new(_draw_radar, self);
+       GisCallback *hud_cb   = gis_callback_new(_draw_hud, self);
 
-       callback = gis_callback_new(_draw_hud, self);
-       gis_viewer_add(viewer, GIS_OBJECT(callback), GIS_LEVEL_HUD, FALSE);
+       gis_viewer_add(viewer, GIS_OBJECT(radar_cb),    GIS_LEVEL_WORLD, TRUE);
+       gis_viewer_add(viewer, GIS_OBJECT(hud_cb),      GIS_LEVEL_HUD,   FALSE);
 
        return self;
 }