Question -- webchat update button

62 views
Skip to first unread message

Jonathan Scherch [KK7PW]

unread,
Mar 16, 2025, 9:40:03 AMMar 16
to DigiPi
Craig, is there a way to change the webchat Update function to reflect miles rather than kilometers?

73.

de KK7PW

Craig

unread,
Mar 16, 2025, 9:46:24 AMMar 16
to Jonathan Scherch [KK7PW], DigiPi
Hi Jonathan, yah, I need to make this an Initialize option, but for now, you can
edit config/aprsd/aprsd.conf

Shell
Login: pi
Password: raspberry

sudo remount
sudo nano config/aprsd/aprsd.conf


# Units for display, imperial or metric (string value)
units = metric



I haven't tried this, so let us know please,
-craig
KM6LYW
--
You received this message because you are subscribed to the Google Groups "DigiPi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to digipi+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/digipi/92989f61-c0c6-4742-a035-31cbf46717fen%40googlegroups.com.

Jonathan Scherch [KK7PW]

unread,
Mar 20, 2025, 11:31:19 AMMar 20
to DigiPi
Hi Craig,

I made the edit by removing #, rebooted and still reading KM's in webchat.

Any other ideas for us "imperial-ists"?

73.

de KK7PW
Message has been deleted

Jonathan Scherch [KK7PW]

unread,
Oct 29, 2025, 11:39:12 AM (10 days ago) Oct 29
to DigiPi
Jonathan Scherch [KK7PW]
8:38 AM (now) 
to DigiPi
Hi Craig, 

I am seeing KM in Webchat and want to see miles. Could you remind me how to make this change?

Thanks and 73.

Jonathan

Craig

unread,
Oct 29, 2025, 11:45:34 AM (10 days ago) Oct 29
to Jonathan Scherch [KK7PW], DigiPi
I don't have the conversion handy, but if you're into python you can convert msg['distance'] to miles here,


.aprsd-venv/lib/python3.13/site-packages/aprsd_webchat_extension/web/chat/static/js/send-message.js

function build_location_string_small(msg) {
   dt = new Date(parseInt(msg['lasttime']) * 1000);
   loc = "" + msg['distance'] + "km";
   //loc += "Lat " + msg['lat'] + " Lon " + msg['lon'];
   loc += " " + msg['compass_bearing'];
   //loc += " Distance " + msg['distance'] + " km";
   //loc += " " + dt.toLocaleString();
   loc += " " + msg['timeago'];
   return loc;
}

Jonathan Scherch [KK7PW]

unread,
Oct 29, 2025, 12:39:16 PM (10 days ago) Oct 29
to DigiPi
Thanks. Nope -- not sure-footed with Python. I thought that you offered this option in a previous DigiPi version, no? 

73.

de KK7PW
Reply all
Reply to author
Forward
0 new messages