Make conditional compiling on the MCDU work
Signed-off-by: fly <merspieler@alwaysdata.net>
This commit is contained in:
parent
79c05cb260
commit
aea022735a
3 changed files with 15 additions and 11 deletions
|
@ -12,6 +12,9 @@
|
|||
* 0x20: IND
|
||||
* 0x40: FM1
|
||||
|
||||
## Firmware
|
||||
use the `--features FO` and `--features third` flags to compile for the FO and 3rd occupant MCDUs
|
||||
|
||||
## Display
|
||||
I couldn't find a matching display which fits between all the components on the front so I created a cutout in the PCB and put the display behind the PCB.
|
||||
For the display I'm using this display [8" 800x480 TFT LCD Dislay with Mini HDMI Board from BuyDisplay](https://www.buydisplay.com/8-inch-800x480-tft-lcd-dislay-with-mini-hdmi-board-for-raspebrry-pi). If you use a display with different dimensions, you need to adjust the display holders. To do that, open the MCDU.d3ddoc in Dune3D and modify the dimensions of "Display Dummy Sketch" and "Display Dummy Extrude". This will automatically modify the display holder. Select the last element under "Display Holder", "Display Holder Screw hole Extrude", press space bar and enter "stl" to export the new holder .stl file fitting your display.
|
||||
|
|
|
@ -42,3 +42,4 @@ panic="abort"
|
|||
|
||||
[features]
|
||||
FO = []
|
||||
third = []
|
||||
|
|
|
@ -124,26 +124,26 @@ fn main() -> ! {
|
|||
.add_device(CustomConfig::default())
|
||||
.build(&usb_bus);
|
||||
|
||||
|
||||
let mut usb_dev = if cfg!(FO) {
|
||||
UsbDeviceBuilder::new(&usb_bus, UsbVidPid(0x16c0, 0x27db))
|
||||
#[cfg(feature = "FO")]
|
||||
let mut usb_dev = UsbDeviceBuilder::new(&usb_bus, UsbVidPid(0x16c0, 0x27db))
|
||||
.manufacturer("FLC Meow")
|
||||
.product("MCDU First Officer")
|
||||
.serial_number("01189998819991197252")
|
||||
.build()
|
||||
} else if cfg!(third) {
|
||||
UsbDeviceBuilder::new(&usb_bus, UsbVidPid(0x16c0, 0x27dc))
|
||||
.build();
|
||||
|
||||
#[cfg(feature = "third")]
|
||||
let mut usb_dev = UsbDeviceBuilder::new(&usb_bus, UsbVidPid(0x16c0, 0x27dc))
|
||||
.manufacturer("FLC Meow")
|
||||
.product("MCDU 3rd Occupant")
|
||||
.serial_number("01189998819991197251")
|
||||
.build()
|
||||
} else {
|
||||
UsbDeviceBuilder::new(&usb_bus, UsbVidPid(0x16c0, 0x27da))
|
||||
.build();
|
||||
|
||||
#[cfg(not(any(feature = "FO", feature = "third")))]
|
||||
let mut usb_dev = UsbDeviceBuilder::new(&usb_bus, UsbVidPid(0x16c0, 0x27da))
|
||||
.manufacturer("FLC Meow")
|
||||
.product("MCDU Captain")
|
||||
.serial_number("01189998819991197253")
|
||||
.build()
|
||||
};
|
||||
.build();
|
||||
|
||||
// ====================== Pin setup =================
|
||||
let mut io_pins = MyPins {
|
||||
|
|
Loading…
Add table
Reference in a new issue