Pot Ranges #13
Replies: 3 comments
-
|
In hasak/input.h: input_cook_value, sort of messy and overly tweaked.
…-- rec --
On Sat, Feb 12, 2022 at 2:49 AM Simon Brown ***@***.***> wrote:
So,
Feb 12th, 07h48m looking through the code I don't see where the pot ranges
are defined. Speed returns 5 to 54, others values in the 16k+ range. Really
I'm looking for the logic for pot values other than Speed.
—
Reply to this email directly, view it on GitHub
<#13>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACVNDN3PWXJOKHCOTBR2ZLU2YGJ5ANCNFSM5OGLUNIQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
In the "CWKeyerShield" library and in hasak, this seems to be different. The CWKeyerShield library, which is used by TeensyWinkeyEmulator, produces values in the following ranges for a "full turn" of the four pots: master volume: 0 - 127 In order to get rock-stable readings, the frequency pot is "discretized" into 64 different values, and The 64 different "bins" of freq pot readings are then interpreted as 400, 410, 420, ..., 1030 Hz P.S. one could do the same for the frequency, having smaller delta-freq (in Hz) at the lower end and larger at the |
Beta Was this translation helpful? Give feedback.
-
|
Hasak is moving to linear interpolation of 10 bit analog read values into a
NRPN configurable segment of NRPN configurable 14 bit NRPN value, so you'll
be able to change the pot mapping range and slope as you find convenient.
Each analog pin is also going to get a samplePeriod.
The adc_read value is generated by the ResponsiveAnalogRead library.
Then you can switch the pots from [Volume, STVolume, Tone, Speed] to
[Speed, Weight, Ratio, Comp] or something else, and make them as coarse or
twitchy as you like.
So:
adc_channel = { adc_pin, adc_nrpn, adc_period, adc_endpoint1,
adc_endpoint2 }
if (pin_valid(adc_pin)) {
every adc_period { nrpn_value[adc_nrpn] =
(adc_endpoint1*adc_read+adc_endpoint2*(1024-adc_read))/1024 }
}
You can correct for forward/reverse wired pots by swapping the endpoints.
There will also be a way for some set of nrpn_values to map down to 7 bits
and fire midi notes for the incorrigible SDR apps.
…On Mon, Feb 14, 2022 at 9:25 AM dl1ycf ***@***.***> wrote:
In the "CWKeyerShield" library and in hasak, this seems to be different.
The CWKeyerShield library, which is used by TeensyWinkeyEmulator, produces
values in the following ranges:
master volume: 0 - 127
side tone volume: 0 - 127
side tone frequency: 0 - 127 mapping to a frequency of 0 - 1270 Hz
CW speed: 5 - 52
In the last case, the pot initially produces a value from 0 - 31 and then
the wpm is looked up in a table, see CWKeyerShield.h
//
// CW speed table (wpm), in 32 steps from 5 to 52 wpm.
// differences between adjacent steps increase at the
// top of the scale. With the pot in center position we
// have about 20 wpm.
//
uint8_t SpeedTab[32] = { 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 26, 28, 30, 32,
34, 36, 38, 40, 43, 46, 49, 52};
—
Reply to this email directly, view it on GitHub
<#13 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACVNDPRFKCGPCSCHZU4NB3U3EAT3ANCNFSM5OGLUNIQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
So,
Feb 12th, 07h48m looking through the code I don't see where the pot ranges are defined. Speed returns 5 to 54, others values in the 16k+ range. Really I'm looking for the logic for pot values other than Speed.
Beta Was this translation helpful? Give feedback.
All reactions