AllStarLink / app_rpt

Refactoring and upgrade of AllStarLink's app_rpt, etc.
3 stars 2 forks source link

chan_usbradio and chan_simpleusb: Add auto assign device string when blank #297

Closed KB4MDD closed 3 months ago

KB4MDD commented 3 months ago

chan_usbradio and chan_simpleusb will now automatically assign a devicestring, 'devstr', when it is blank.

This allows the default configuration files to be published with devstr left blank. The default hardcoded value for devstr may not be the correct value on the end user's computer.

This will allow users to start up with minimal configuration changes. When the user saves the tune settings, the automatically assigned devstr will be written to the configuration file.

This closes #284.

tsawyer commented 3 months ago

When the USB device string (devstr) is empty, susb show settings shows the first USB device string as expected and susb tune save wrote the first USB device string to simpleusb.conf as expected.

I thought the USB device string might become populated when empty on asterisk start. That's not the case and it makes sense that user setup is required.

KB4MDD commented 3 months ago

If devstr is blank at startup, it will be populated if a device is available. It will be open and operating (blinking).

tsawyer commented 3 months ago

If devstr is blank at startup, it will be populated if a device is available. It will be open and operating (blinking).

Ok, yes. The URI is blinking. But it's not written to simpleusb.conf until a save. Is that intentional?

KB4MDD commented 3 months ago

It was intentional. My thought is that the user would have to adjust the audio levels. That process will store the tune values along with the devstr.

If you would prefer that it be stored immediately, I will be glad to add that code.

tsawyer commented 3 months ago

If you would prefer that it be stored immediately, I will be glad to add that code.

No, it's fine as it is. Just making sure that's the way it's supposed to work.