diff --git a/client.go b/client.go index 25f91fb..39915a7 100644 --- a/client.go +++ b/client.go @@ -463,25 +463,25 @@ keyPressListenerLoop: reset() break keyPressListenerLoop case term.KeyDelete: - b.commandKeyDel() + b.cmdKeyDel() case term.KeyF1: - b.KeyChannelUp() + b.cmdChannelUp() case term.KeyF2: - b.KeyChannelDown() + b.cmdChannelDown() case term.KeyF3: - b.KeyMuteUnmute("toggle") + b.cmdMuteUnmute("toggle") case term.KeyF4: - b.KeyCurrentVolume() + b.cmdCurrentVolume() case term.KeyF5: - b.KeyVolumeUp() + b.cmdVolumeUp() case term.KeyF6: - b.KeyVolumeDown() + b.cmdVolumeDown() case term.KeyF7: - b.KeyListServerChannels() + b.cmdListServerChannels() case term.KeyF8: - b.KeyStartTransmitting() + b.cmdStartTransmitting() case term.KeyF9: - b.KeyStopTransmitting() + b.cmdStopTransmitting() case term.KeyF10: b.cmdListOnlineUsers() case term.KeyF11: diff --git a/commandkeys.go b/commandkeys.go index dda26e1..b8167e5 100644 --- a/commandkeys.go +++ b/commandkeys.go @@ -41,7 +41,7 @@ import ( "time" ) -func (b *Talkkonnect) commandKeyDel() { +func (b *Talkkonnect) cmdKeyDel() { log.Println("debug: Delete Key Pressed Menu and Session Information Requested") if TTSEnabled && TTSDisplayMenu { @@ -56,17 +56,17 @@ func (b *Talkkonnect) commandKeyDel() { b.ParticipantLEDUpdate(true) } -func (b *Talkkonnect) KeyChannelUp() { +func (b *Talkkonnect) cmdChannelUp() { log.Println("debug: F1 pressed Channel Up (+) Requested") b.ChannelUp() } -func (b *Talkkonnect) KeyChannelDown() { +func (b *Talkkonnect) cmdChannelDown() { log.Println("debug: F2 pressed Channel Down (-) Requested") b.ChannelDown() } -func (b *Talkkonnect) KeyMuteUnmute(subCommand string) { +func (b *Talkkonnect) cmdMuteUnmute(subCommand string) { log.Println("debug: ", TTSMuteUnMuteSpeakerFilenameAndPath) //any other subcommand besides mute and unmute will get the current status of mute from volume.go @@ -139,7 +139,7 @@ func (b *Talkkonnect) KeyMuteUnmute(subCommand string) { } -func (b *Talkkonnect) KeyCurrentVolume() { +func (b *Talkkonnect) cmdCurrentVolume() { origVolume, err := volume.GetVolume(OutputDevice) if err != nil { log.Println("error: Unable to get current volume: %+v", err) @@ -167,7 +167,7 @@ func (b *Talkkonnect) KeyCurrentVolume() { } } -func (b *Talkkonnect) KeyVolumeUp() { +func (b *Talkkonnect) cmdVolumeUp() { origVolume, err := volume.GetVolume(OutputDevice) if err != nil { log.Println("warn: unable to get original volume: %+v", err) @@ -214,7 +214,7 @@ func (b *Talkkonnect) KeyVolumeUp() { } -func (b *Talkkonnect) KeyVolumeDown() { +func (b *Talkkonnect) cmdVolumeDown() { origVolume, err := volume.GetVolume(OutputDevice) if err != nil { log.Println("error: unable to get original volume: %+v", err) @@ -263,7 +263,7 @@ func (b *Talkkonnect) KeyVolumeDown() { } -func (b *Talkkonnect) KeyListServerChannels() { +func (b *Talkkonnect) cmdListServerChannels() { log.Println("debug: F7 pressed Channel List Requested") if TTSEnabled && TTSListServerChannels { @@ -278,7 +278,7 @@ func (b *Talkkonnect) KeyListServerChannels() { b.ParticipantLEDUpdate(true) } -func (b *Talkkonnect) KeyStartTransmitting() { +func (b *Talkkonnect) cmdStartTransmitting() { log.Println("debug: F8 pressed TX Mode Requested (Start Transmitting)") log.Println("info: Start Transmitting") @@ -305,7 +305,7 @@ func (b *Talkkonnect) KeyStartTransmitting() { } } -func (b *Talkkonnect) KeyStopTransmitting() { +func (b *Talkkonnect) cmdStopTransmitting() { log.Println("debug: F9 pressed RX Mode Request (Stop Transmitting)") log.Println("info: Stop Transmitting") diff --git a/httpapi.go b/httpapi.go index 62fabb3..6982280 100644 --- a/httpapi.go +++ b/httpapi.go @@ -50,84 +50,84 @@ func (b *Talkkonnect) httpAPI(w http.ResponseWriter, r *http.Request) { switch string(command) { case "DEL": if APIDisplayMenu { - b.commandKeyDel() + b.cmdKeyDel() fmt.Fprintf(w, "API Display Menu Request Processed Succesfully\n") } else { fmt.Fprintf(w, "API Display Menu Request Denied\n") } case "F1": if APIChannelUp { - b.KeyChannelUp() + b.cmdChannelUp() fmt.Fprintf(w, "API Channel Up Request Processed Succesfully\n") } else { fmt.Fprintf(w, "API Channel Up Request Denied\n") } case "F2": if APIChannelDown { - b.KeyChannelDown() + b.cmdChannelDown() fmt.Fprintf(w, "API Channel Down Request Processed Succesfully\n") } else { fmt.Fprintf(w, "API Channel Down Request Denied\n") } case "F3": if APIMute { - b.KeyMuteUnmute("toggle") + b.cmdMuteUnmute("toggle") fmt.Fprintf(w, "API Mute/UnMute Speaker Request Processed Succesfully\n") } else { fmt.Fprintf(w, "API Mute/Unmute Speaker Request Denied\n") } case "F3-mute": if APIMute { - b.KeyMuteUnmute("mute") + b.cmdMuteUnmute("mute") fmt.Fprintf(w, "API Mute/UnMute Speaker Request Processed Succesfully\n") } else { fmt.Fprintf(w, "API Mute/Unmute Speaker Request Denied\n") } case "F3-unmute": if APIMute { - b.KeyMuteUnmute("unmute") + b.cmdMuteUnmute("unmute") fmt.Fprintf(w, "API Mute/UnMute Speaker Request Processed Succesfully\n") } else { fmt.Fprintf(w, "API Mute/Unmute Speaker Request Denied\n") } case "F4": if APICurrentVolumeLevel { - b.KeyCurrentVolume() + b.cmdCurrentVolume() fmt.Fprintf(w, "API Current Volume Level Request Processed Succesfully\n") } else { fmt.Fprintf(w, "API Current Volume Level Request Denied\n") } case "F5": if APIDigitalVolumeUp { - b.KeyVolumeUp() + b.cmdVolumeUp() fmt.Fprintf(w, "API Digital Volume Up Request Processed Succesfully\n") } else { fmt.Fprintf(w, "API Digital Volume Up Request Denied\n") } case "F6": if APIDigitalVolumeDown { - b.KeyVolumeDown() + b.cmdVolumeDown() fmt.Fprintf(w, "API Digital Volume Down Request Processed Succesfully\n") } else { fmt.Fprintf(w, "API Digital Volume Down Request Denied\n") } case "F7": if APIListServerChannels { - b.KeyListServerChannels() + b.cmdListServerChannels() fmt.Fprintf(w, "API List Server Channels Request Processed Succesfully\n") } else { fmt.Fprintf(w, "API List Server Channels Request Denied\n") } case "F8": if APIStartTransmitting { - b.KeyStartTransmitting() + b.cmdStartTransmitting() fmt.Fprintf(w, "API Start Transmitting Request Processed Succesfully\n") } else { fmt.Fprintf(w, "API Start Transmitting Request Denied\n") } case "F9": if APIStopTransmitting { - b.KeyStopTransmitting() + b.cmdStopTransmitting() fmt.Fprintf(w, "API Stop Transmitting Request Processed Succesfully\n") } else { fmt.Fprintf(w, "API Stop Transmitting Request Denied\n") diff --git a/mqtt.go b/mqtt.go index 39ad62a..f1ea343 100644 --- a/mqtt.go +++ b/mqtt.go @@ -205,40 +205,40 @@ func (b *Talkkonnect) onMessageReceived(client MQTT.Client, message MQTT.Message switch string(message.Payload()) { case "DEL": log.Println("info: MQTT Display Menu Request Processed Succesfully") - b.commandKeyDel() + b.cmdKeyDel() case "F1": log.Println("info: MQTT Channel Up Request Processed Succesfully\n") - b.KeyChannelUp() + b.cmdChannelUp() case "F2": log.Println("info: MQTT Channel Down Request Processed Succesfully\n") - b.KeyChannelDown() + b.cmdChannelDown() case "F3": log.Println("info: MQTT Mute/UnMute Speaker Request Processed Succesfully\n") - b.KeyMuteUnmute("toggle") + b.cmdMuteUnmute("toggle") case "F3-mute": log.Println("info: MQTT Mute/UnMute Speaker Request Processed Succesfully\n") - b.KeyMuteUnmute("mute") + b.cmdMuteUnmute("mute") case "F3-unmute": log.Println("info: MQTT Mute/UnMute Speaker Request Processed Succesfully\n") - b.KeyMuteUnmute("unmute") + b.cmdMuteUnmute("unmute") case "F4": log.Println("info: MQTT Current Volume Level Request Processed Succesfully\n") - b.KeyCurrentVolume() + b.cmdCurrentVolume() case "F5": log.Println("info: MQTT Digital Volume Up Request Processed Succesfully\n") - b.KeyVolumeUp() + b.cmdVolumeUp() case "F6": log.Println("info: MQTT Digital Volume Down Request Processed Succesfully\n") - b.KeyVolumeDown() + b.cmdVolumeDown() case "F7": log.Println("info: MQTT List Server Channels Request Processed Succesfully\n") - b.KeyListServerChannels() + b.cmdListServerChannels() case "F8": log.Println("info: MQTT Start Transmitting Request Processed Succesfully\n") - b.KeyStartTransmitting() + b.cmdStartTransmitting() case "F9": log.Println("info: MQTT Stop Transmitting Request Processed Succesfully\n") - b.KeyStopTransmitting() + b.cmdStopTransmitting() case "F10": log.Println("info: MQTT List Online Users Request Processed Succesfully\n") b.cmdListOnlineUsers() diff --git a/xmlparser.go b/xmlparser.go index 3cc386b..efaa541 100644 --- a/xmlparser.go +++ b/xmlparser.go @@ -51,8 +51,8 @@ import ( //version and release date const ( - talkkonnectVersion string = "1.56.02" - talkkonnectReleased string = "January 21 2021" + talkkonnectVersion string = "1.56.03" + talkkonnectReleased string = "January 22 2021" ) var (