xlog-discussion
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xlog-discussion] bug reading RF power level?


From: Brian Mury
Subject: [Xlog-discussion] bug reading RF power level?
Date: Sat, 18 Jun 2005 16:46:00 -0300

I just joined this list and found this in the archives...

> I use XLog with my K2/100 and have been looking to try and get mode and
> power settings from the rig automatically.  Having spoken with Brian
> Mury (present mainainer of K2 hamlib) I know there is an issue with
> showing the power on the K2/100 and that is on his to do list.

I'm looking at the power level right now. I think there may be an XLog
bug as well as a hamlib bug. In addtolog_or_qsoframe:

  qso[POWER] = g_strdup_printf ("%d", state.rigpower * 256 / 100000);

and in on_powerbutton_clicked():

  rigpower = g_strdup_printf ("%d", state.rigpower * 256 / 100000);

the state.rigpower is being scaled by 256/100000, but in get_powerlevel():

  retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_RFPOWER, &val);
  if (retcode == RIG_OK)
  {
    status = rig_power2mW (myrig, &state.rigpower, val.f, state.rigfrequency, 
state.rigmode);
  }

the value that is being scaled is provided by hamlib's rig_power2mW,
which should be a value in milliwatts, and shouldn't require scaling
(other than perhaps to convert to watts).

Am I missing something, or is this a bug?

-- 
73, Brian
VE7NGR





reply via email to

[Prev in Thread] Current Thread [Next in Thread]