TheSylex / ELK-BLEDOM-bluetooth-led-strip-controller

Controller for sending commands to Chinese generic Bluetooth receiver ELK-BLEDOM on most RGB LED strips.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

windows-specific code?

davebarr opened this issue · comments

I'm new to rust as well as btle. It appears that this program uses windows-specific APIs (struct) when defining BleLedDevice:

pub struct BleLedDevice {
    peripheral: btleplug::winrtble::peripheral::Peripheral,
    characteristics: Vec<btleplug::api::Characteristic>,
}

when building on linux I get:

% cargo build
   Compiling blte_test v0.1.0 (/home/pi/git/ELK-BLEDOM-bluetooth-led-strip-controller)
error[E0433]: failed to resolve: could not find `winrtble` in `btleplug`
   --> src/device.rs:106:27
    |
106 |     peripheral: btleplug::winrtble::peripheral::Peripheral,
    |                           ^^^^^^^^ could not find `winrtble` in `btleplug`

I'm digging through the code trying to refactor this but not having much luck, the btleplug API is a bit of a mess.

Ah there's a long explanation about this in deviceplug/btleplug#73, with not a simple answer, alas

commented

Yeah, actually I tried to do it with the generalized struct but couldn't get it to work, I'm using it on Windows so it didn't bother me enough to dig deeper, so I just stick with the windows one. Feel free to do a pull request or suggest a change if you find the right way.

Same problem here, not compiling on linux :(

Hi, it would be so cool if this would run on a Raspberry Pi / Linux...with animation sync to soundoutput...or as a Kodi addon....unfortunately I dont know anything about Rust.

I am on linux trying to figure this out right now, this is the first time ive ever touched rust.