[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 32d064d60ba6ae732fc7b
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: n0nb <n0...@us...> - 2025-08-20 18:20:29
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 32d064d60ba6ae732fc7b1c590ae91296b9e1217 (commit) via 8847cbeafb1cfdebcad62e9f3eaeab1980a15040 (commit) from cbefd0835f5284509d5b32b1f50251aa2c3f82f3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 32d064d60ba6ae732fc7b1c590ae91296b9e1217 Merge: cbefd0835 8847cbeaf Author: Nate Bargmann <n0...@n0...> Date: Wed Aug 20 13:03:23 2025 -0500 Merge GitHub PR #1860 commit 8847cbeafb1cfdebcad62e9f3eaeab1980a15040 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Wed Aug 20 19:18:02 2025 +0200 Implement send_raw for the Perl bindings Doesn't allow '\0' embedded in the strings to be sent or received. Closes #1479. diff --git a/bindings/perltest.pl b/bindings/perltest.pl index 509560ad6..92a935187 100755 --- a/bindings/perltest.pl +++ b/bindings/perltest.pl @@ -68,6 +68,15 @@ print "Attenuators:\t\t@$att\n"; print "\nSending Morse, '73'\n"; $rig->send_morse($Hamlib::RIG_VFO_A, "73"); +print "\nSending raw string\n"; +$send = "test string 012\n"; + +$reply = $rig->send_raw($send, "\n"); +exit(1) if(!$reply eq $send); + +$reply = $rig->send_raw($send, "1"); +exit(1) if(!$reply eq "test string 01"); + $rig->close(); diff --git a/bindings/rig.swg b/bindings/rig.swg index 7aca173ef..1d23e69a8 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -782,6 +782,17 @@ int *rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_lin } #endif +#ifdef SWIGPERL + char *send_raw(char *send, char *term, char *returnstr) + { + returnstr[0] = '\0'; + int count; + + count = rig_send_raw(self->rig, send, strlen(send), returnstr, MAX_RETURNSTR, term); + self->error_status = count < 0 ? count : RIG_OK; + } +#endif + //#ifndef SWIGJAVA /* TODO */ void get_level(setting_t level, vfo_t vfo = RIG_VFO_CURR) ----------------------------------------------------------------------- Summary of changes: bindings/perltest.pl | 9 +++++++++ bindings/rig.swg | 11 +++++++++++ 2 files changed, 20 insertions(+) hooks/post-receive -- Hamlib -- Ham radio control libraries |