Bug or Feature?

Forum for discussion about the Langstone Microwave Transceiver that shares some features with the Portsdown. Wiki: https://wiki.microwavers.org.uk/Langstone_Project
Post Reply
G4FKK
Posts: 135
Joined: Sun May 05, 2019 12:15 pm

Bug or Feature?

Post by G4FKK » Sat Aug 21, 2021 1:28 pm

Hi Colin,

I've discovered that if you click, for example, the right mouse button and then very quickly click the left, the Langstone acts as if it's received a scroll button click i.e. the lock indicator comes on and the frequency cannot be adjusted. Doing a rapid right/left (or left/right), click turns lock off again. I wonder if this is deliberate or some sort of bug somewhere?

The reason I ask is that I've implemented a 12.5kHz step option on my version of Arduino mouse emulator which is controlled both by a rotary encoder and also a Nextion display. This works as follows...

1) generate 9 right clicks to shift the cursor to the far right digit
2) generate one left click to shift the cursor to the 100Hz digit
3) generate 125 up or down scrolls to shift the frequency up or down 12.5kHz when the rotary encoder is moved one step

Due to the bug-or-feature, the Langstone goes into Lock mode after step 2.

I've fixed my firmware by inserting a 250mS delay between steps 1 and 2. (Anything much less is not enough).

It's obviously not an issue but I'm just interested.

73, Martin - G4FKK

g4eml
Posts: 674
Joined: Thu Apr 26, 2018 9:36 am

Re: Bug or Feature?

Post by g4eml » Sun Aug 22, 2021 10:10 am

Hi. Martin,

The Langstone code will set the dial lock on pressing the middle button or on pressing both buttons together. This is because some people only fitted two buttons to their Langstone.
The ‘both buttons together’ detection is done by detecting button presses within 100ms. In that case a press of one followed rapidly by a press of the other could case the dial lock to be activated which is what is probably happening for you.


If you want to disable the double button detection you would need to edit LangstoneGUI.c and alter a line in the process_mouse() function.

Change

if((mbut==3+128) | (lastBut==3)) //Middle button down or both buttons within 100ms

To

if(mbut==3+128) //Middle button down


Then do a ./build command.



Colin.

G4FKK
Posts: 135
Joined: Sun May 05, 2019 12:15 pm

Re: Bug or Feature?

Post by G4FKK » Sun Aug 22, 2021 11:43 am

Ah! I'd forgotten the pressing-both-buttons-together facility. That explains it perfectly and definitely a feature :) Thanks Colin.

All the best,

Martin

g4eml
Posts: 674
Joined: Thu Apr 26, 2018 9:36 am

Re: Bug or Feature?

Post by g4eml » Sun Aug 22, 2021 2:41 pm

You maybe could try

9 right clicks
2 left clicks
1 right click

That should (may!) result in the dial lock being set and then cleared again.

Colin.

G4FKK
Posts: 135
Joined: Sun May 05, 2019 12:15 pm

Re: Bug or Feature?

Post by G4FKK » Sun Aug 22, 2021 9:32 pm

Yes, that would do the trick Colin and somewhat more elegant than my 250mS delay :)

I'll give it a whirl tomorrow.

Many thanks,

Martin.

Post Reply

Return to “The Langstone Microwave Transceiver”