#include "mode.h"
#include "vox.h"
#include "new_menu.h"
+#include "vfo.h"
static GtkWidget *parent_window;
cairo_set_source_rgb(cr, 1.0, 1.0, 1.0);
angle=fmax(-127.0,level)+127.0+offset;
+
+ // if frequency > 30MHz then -93 is S9
+ if(vfo[active_receiver->id].frequency>30000000LL) {
+ angle=angle+20;
+ }
+
+
radians=angle*M_PI/180.0;
cairo_arc(cr, cx, cy, radius+8, radians, radians);
cairo_line_to(cr, cx, cy);
}
if(meter_width>=114) {
- //int db=meter_width/114; // S9+60 (9*6)+60
- //if(db>2) db=2;
int db=1;
int i;
cairo_set_line_width(cr, 1.0);
cairo_show_text(cr, "+60");
cairo_set_source_rgb(cr, 0.0, 1.0, 0.0);
- cairo_rectangle(cr, offset+0.0, (double)(meter_height-40), (double)((fmax(-127.0,level)+127.0)*db), 20.0);
+ // if frequency > 30MHz then -93 is S9
+ double l=fmax(-127.0,level);
+ if(vfo[active_receiver->id].frequency>30000000LL) {
+ l=level+20.0;
+ }
+
+ cairo_rectangle(cr, offset+0.0, (double)(meter_height-40), (double)((l+127.0)*db), 20.0);
cairo_fill(cr);
- if(level>max_level || max_count==10) {
- max_level=level;
+ if(l>max_level || max_count==10) {
+ max_level=l;
max_count=0;
}
- if(max_level!=0) {
+ if(l!=0) {
cairo_set_source_rgb(cr, 1.0, 1.0, 0.0);
cairo_move_to(cr,offset+(double)((max_level+127.0)*db),(double)meter_height-20);
cairo_line_to(cr,offset+(double)((max_level+127.0)*db),(double)(meter_height-40));