Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First steps towards support for Mustang/Rumble LT series amps #28

Closed
wants to merge 30 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1aa4f89
Merge pull request #1 from offa/master
tim-littlefair Sep 25, 2023
a4e28bf
Added note advising names of Ubuntu/Debian packages required to deliv…
tim-littlefair Sep 25, 2023
a9deb6e
LT40S being recognized, but not attempting to process it yet
tim-littlefair Sep 25, 2023
d1e14c9
Merging back upstream changes after https://github.com/offa/plug/pull/19
tim-littlefair Oct 6, 2024
e6dd8fe
As of this commit, the name of the LT 40S is captured, but parsing am…
tim-littlefair Oct 6, 2024
c69ad2f
Added PID for Mustang Micro - as of this commit report for the device…
tim-littlefair Oct 6, 2024
34bf91e
Added CLI option for V3 device enablement
tim-littlefair Oct 7, 2024
1bd6303
WIP on CLI flag for V3USB feature
tim-littlefair Oct 7, 2024
79feee6
Mustang class now handles deserialization separately for new category…
tim-littlefair Oct 9, 2024
b232f3a
App now runs gracefully when connected to LT40S
tim-littlefair Oct 9, 2024
d3afee6
Cloned MustangTest.cpp as a basis for a test for V3USB functionality …
tim-littlefair Oct 9, 2024
116bda7
Added test for v3 recognition and current lack of functionality
tim-littlefair Oct 11, 2024
80bfafe
Re-enabled attempt to read name payload
tim-littlefair Oct 11, 2024
6d28b92
Added kdevelop project
tim-littlefair Oct 11, 2024
7467639
Script to add udev rules to let non-root users access any Fender/Must…
tim-littlefair Oct 11, 2024
7f97d60
Not running as root any more
tim-littlefair Oct 11, 2024
7f1284a
New init function for V3_USB added - 24 packets returned
tim-littlefair Oct 11, 2024
9fff8ee
Tweaked debug output
tim-littlefair Oct 12, 2024
7e25b0e
Added wordy comment about limited support for LT series and less for …
tim-littlefair Oct 12, 2024
539bb13
Commented out whole of MustangV3UsbTest pending fixing it
tim-littlefair Oct 12, 2024
c7dbe63
cmake build directory debug should never have been in git
tim-littlefair Oct 12, 2024
a386185
Commented out whole of MustangV3UsbTest pending fixing it
tim-littlefair Oct 12, 2024
fec90e3
Working to resolve clang-format-lint issues in https://github.com/off…
tim-littlefair Oct 12, 2024
1123205
Working to resolve clang-format-lint issues in https://github.com/off…
tim-littlefair Oct 12, 2024
55249ee
Working to resolve clang-format-lint issues in https://github.com/off…
tim-littlefair Oct 12, 2024
511e05a
Working to resolve clang-format-lint issues in https://github.com/off…
tim-littlefair Oct 12, 2024
814cb57
Merge branch 'tims' of github.com:tim-littlefair/plug into tims
tim-littlefair Oct 12, 2024
f74efa4
Working to resolve clang-format-lint issues in https://github.com/off…
tim-littlefair Oct 12, 2024
19eadaf
Working to resolve clang-format-lint issues in https://github.com/off…
tim-littlefair Oct 12, 2024
6c6b181
Working to resolve clang-format-lint issues in https://github.com/off…
tim-littlefair Oct 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
LT40S being recognized, but not attempting to process it yet
  • Loading branch information
tim-littlefair committed Sep 25, 2023
commit a9deb6e14ea516012fd89a9df59fce97c34aef8e
5 changes: 5 additions & 0 deletions cmake/50-mustang.rules
Original file line number Diff line number Diff line change
@@ -16,4 +16,9 @@ ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0015", ENV{ID_AUDIO_MODELING_AMP}="1
ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0016", ENV{ID_AUDIO_MODELING_AMP}="1"
ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0017", ENV{ID_AUDIO_MODELING_AMP}="1"

# Mustang/Rumble LT series (experimental, even less warranty than usual)
ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0037", ENV{ID_AUDIO_MODELING_AMP}="1"
ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0038", ENV{ID_AUDIO_MODELING_AMP}="1"
ATTRS{idVendor}=="1ed8", ATTRS{idProduct}=="0046", ENV{ID_AUDIO_MODELING_AMP}="1"

LABEL="mustang_plug_rules_end"
3 changes: 2 additions & 1 deletion include/com/Connection.h
Original file line number Diff line number Diff line change
@@ -29,7 +29,8 @@ namespace plug::com
enum ModelVersion
{
v1,
v2
v2,
v3
};

class Connection
35 changes: 31 additions & 4 deletions src/com/ConnectionFactory.cpp
Original file line number Diff line number Diff line change
@@ -39,6 +39,10 @@ namespace plug::com
inline constexpr std::uint16_t mustangFloor{0x0012};
inline constexpr std::uint16_t mustangI_II_v2{0x0014};
inline constexpr std::uint16_t mustangIII_IV_V_v2{0x0016};

inline constexpr std::uint16_t mustangLT25{0x0037};
inline constexpr std::uint16_t rumbleLT25{0x0038};
inline constexpr std::uint16_t mustangLT40S{0x0046};
}

inline constexpr std::initializer_list<std::uint16_t> pids{
@@ -48,11 +52,31 @@ namespace plug::com
usbPID::mustangMini,
usbPID::mustangFloor,
usbPID::mustangI_II_v2,
usbPID::mustangIII_IV_V_v2};
usbPID::mustangIII_IV_V_v2,

usbPID::mustangLT25,
usbPID::rumbleLT25,
usbPID::mustangLT40S};

inline constexpr bool isV2(std::uint16_t pid)
inline constexpr ModelVersion whichVersion(std::uint16_t pid)
{
return (pid == usbPID::mustangI_II_v2) || (pid == usbPID::mustangIII_IV_V_v2);
// Not sure whether this will work on all compilers but
// https://stackoverflow.com/questions/45534410/switch-in-constexpr-function
// suggests it is legal
switch(pid)
{
case usbPID::mustangI_II_v2:
case usbPID::mustangIII_IV_V_v2:
return ModelVersion::v2;

case usbPID::mustangLT25:
case usbPID::rumbleLT25:
case usbPID::mustangLT40S:
return ModelVersion::v3;

default:
return ModelVersion::v1;
}
}
}

@@ -68,7 +92,10 @@ namespace plug::com
{
throw CommunicationException{"No device found"};
}
const auto modelVersion = isV2(itr->productId()) ? ModelVersion::v2 : ModelVersion::v1;
const auto modelVersion = whichVersion(itr->productId());
if(modelVersion == ModelVersion::v3) {
throw CommunicationException{"Unsupported v3 device found"};
}
return std::make_shared<UsbComm>(std::move(*itr), modelVersion);
}
}