Jump to content

Patriot

Members
  • Posts

    141
  • Joined

  • Last visited

Everything posted by Patriot

  1. I use DCS-BIOS last version and all work fine with DCS 2.5
  2. Thanks for your feedback, I'm glad you like it. Perhaps because everyone starts with the Thrustmaster A-10C kit :) I'm really looking forward to the release of the aircraft Yak-52 - in Russia it is the most popular for learning aerobatics and to find a real cockpit instruments.
  3. Best choice for CMSP and CMSC: https://www.adafruit.com/product/347
  4. Hi all! I tried to run DCS-bios on the STM32 board and with some corrections it worked. Yes, in the current form it slows down and works worse, but if fix the block for DOS BIOS_IRQ_SERIAL (or block for Slave) that it will fly! First correction: Add this code in top of file: char *utoa (unsigned int __val, char *__s, int __radix) { if (!__builtin_constant_p (__radix)) { extern char *__utoa (unsigned int, char *, int); return __utoa (__val, __s, __radix); } else if (__radix < 2 || __radix > 36) { *__s = 0; return __s; } else { extern char *__utoa_ncheck (unsigned int, char *, unsigned char); return __utoa_ncheck (__val, __s, __radix); } } And board will be work with #define DCSBIOS_DEFAULT_SERIAL, but very-very slow. Ok, we can make second fix: change default Serial on Serial2 in DcsBios.h: #ifdef DCSBIOS_DEFAULT_SERIAL namespace DcsBios { ProtocolParser parser; void setup() { Serial2.begin(250000); } void loop() { while (Serial2.available()) { parser.processChar(Serial2.read()); } PollingInput::pollInputs(); ExportStreamListener::loopAll(); } } bool sendDcsBiosMessage(const char* msg, const char* arg) { Serial2.write(msg); Serial2.write(' '); Serial2.write(arg); Serial2.write(' '); } #endif Already better, but still slow - this you can see on the video. I do not have enough knowledge to write the correct code for working with a Serial port through registers. Ian, it will be great if you can support this board in DCS-BIOS, because stm32 all better Arduino nano. Well, or someone else, if Ian refuses.. Arduino nano: 16Mhz, Flash: 32KB RAM: 2KB UART: 1 I2C: 1 PWM: 0-255 Analog read: 0-1024 Price: $1.8 Stm32: 72MHz Flash: 64KB RAM 20KB UART: 3 I2C: 3 PWM: 0-4096 Analog read: 0-65535 Native USB Price: $2
  5. Ian, do you plan to add support for STM32 boards in the future? These boards have the same price as arduino nano, but are several times more powerful.
  6. This code is work: #define DCSBIOS_IRQ_SERIAL #include <SPI.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #include "DcsBios.h" #define digits_00_32x64_width 32 #define digits_00_32x64_height 64 const PROGMEM unsigned char digits_00_32x64_bits[] = { // cut }; #define digits_1to9_32x64_width 32 #define digits_1to9_32x64_height 704 const PROGMEM unsigned char digits_1to9_32x64_bits[] = { //cut }; #define digits_32x64_width 32 #define digits_32x64_height 704 const PROGMEM unsigned char digits_32x64_bits[] = { // cut }; DcsBios::ProtocolParser parser; Adafruit_SSD1306 display(4); void onAlt10000ftCntChange(unsigned int newValue) { drawDigit(0, newValue, digits_1to9_32x64_bits); } void onAlt1000ftCntChange(unsigned int newValue) { drawDigit(1, newValue, digits_32x64_bits); } void onAlt100ftCntChange(unsigned int newValue) { drawDigit(2, newValue, digits_32x64_bits); } DcsBios::IntegerBuffer alt10000ftCntBuffer(0x1080, 0xffff, 0, onAlt10000ftCntChange); DcsBios::IntegerBuffer alt1000ftCntBuffer(0x1082, 0xffff, 0, onAlt1000ftCntChange); DcsBios::IntegerBuffer alt100ftCntBuffer(0x1084, 0xffff, 0, onAlt100ftCntChange); void drawDigit(unsigned int index, unsigned int offset, unsigned char* bits) { unsigned int y_offset_lines = offset / 103; display.fillRect(32*index, 0, 32, 64, BLACK); display.drawXBitmap(32*index, 0, &bits[4*y_offset_lines], 32, 64, WHITE); display.display(); } void setup() { DcsBios::setup(); display.begin(SSD1306_SWITCHCAPVCC); display.clearDisplay(); drawDigit(0, 0, digits_1to9_32x64_bits); drawDigit(1, 0, digits_32x64_bits); drawDigit(2, 0, digits_32x64_bits); drawDigit(3, 0, digits_00_32x64_bits); } void loop() { DcsBios::loop(); } But why not work this code? Not run method onDcsBiosWrite. I use last version of DCS-BIOS #define DCSBIOS_IRQ_SERIAL #include <SPI.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #include "DcsBios.h" #define digits_00_32x64_width 32 #define digits_00_32x64_height 64 const PROGMEM unsigned char digits_00_32x64_bits[] = { // cut }; #define digits_1to9_32x64_width 32 #define digits_1to9_32x64_height 704 const PROGMEM unsigned char digits_1to9_32x64_bits[] = { //cut }; #define digits_32x64_width 32 #define digits_32x64_height 704 const PROGMEM unsigned char digits_32x64_bits[] = { // cut }; DcsBios::ProtocolParser parser; Adafruit_SSD1306 display(4); void drawDigit(unsigned int index, unsigned int offset, unsigned char* bits) { //double y_offset = (double)offset / 65535.0d; //unsigned int y_offset_lines = y_offset * 640; unsigned int y_offset_lines = offset / 103; display.fillRect(32*index, 0, 32, 64, BLACK); display.drawXBitmap(32*index, 0, &bits[4*y_offset_lines], 32, 64, WHITE); display.display(); } void onDcsBiosWrite(unsigned int address, unsigned int value) { address = address & 0xffff; value = value & 0xffff; if (address == 0x1080) { unsigned int alt10000ftCntValue = (value & 0xffff) >> 0; drawDigit(0, alt10000ftCntValue, digits_1to9_32x64_bits); } if (address == 0x1082) { unsigned int alt1000ftCntValue = (value & 0xffff) >> 0; drawDigit(1, alt1000ftCntValue, digits_32x64_bits); } if (address == 0x1084) { unsigned int alt100ftCntValue = (value & 0xffff) >> 0; drawDigit(2, alt100ftCntValue, digits_32x64_bits); } } void setup() { DcsBios::setup(); display.begin(SSD1306_SWITCHCAPVCC); display.clearDisplay(); drawDigit(0, 0, digits_1to9_32x64_bits); drawDigit(1, 0, digits_32x64_bits); drawDigit(2, 0, digits_32x64_bits); drawDigit(3, 0, digits_00_32x64_bits); } void loop() { DcsBios::loop(); }
  7. Look very good!! You can share 3d model of fuel lever knob? This is the best model that I've seen. :)
  8. I bought this monitor: https://ru.aliexpress.com/item/1pc-Universal-HDMI-VGA-2AV-50PIN-TTL-LVDS-Controller-Board-Moudle-8-inch-1024-768-HE080IA/32377395835.html?spm=a2g0s.9042311.0.0.mXmO8N&aff_platform=link-c-tool&cpt=1515679359771&sk=uR7uBY3Rz&aff_trace_key=39403b94ef664a81b5344e49f39790da-1515679359771-06877-uR7uBY3Rz&terminal_id=ba6aabfde375432e887a1d86a35ff81b I used only button cap from thrustmaster. You can see PCB on 6 page: https://forums.eagle.ru/showthread.php?t=159565&page=6 Cut out the frame front of the console. Thank you for drawing Lynx! And video with EGI:
  9. Thank you all for your help, but the problem persists if one motor is connected to one Arduino. I use 3 Arduino to 12 motors. Today, almost found the problem. If 3 Arduino connected to each other, then from somewhere there is noise in the rs485 bus. If at least any one of Arduino disable, then everything is okay. The reason for this behavior are not yet understood. Schematically sketched how it was connected to the problem, and how it reconnected now. Connected with noise in bus: Reconnected normal: And photo: And how work now: lhbkAwPKrlw So, one Arduino can control minimum 4 motors :) Thanks! :)
  10. You've installed the extension as shown in this video?
  11. I made engine gauges instruments with stepper motors (vid29) and connect with dcs-bios. But faced with a problem: when the aircraft is on the ground, then the motors they live their lives. This is clearly seen in the video at 00:50 seconds. I saw a similar problem from someone on the forum, but can't find this topic. What could be the problem? The script for the arduino took here on the forum: #define DCSBIOS_RS485_SLAVE 67 #define TXENABLE_PIN 2 #include <AccelStepper.h> #include "DcsBios.h" struct StepperConfig { unsigned int maxSteps; unsigned int acceleration; unsigned int maxSpeed; }; class Vid29Stepper : public DcsBios::Int16Buffer { private: AccelStepper& stepper; StepperConfig& stepperConfig; unsigned int (*map_function)(unsigned int); unsigned char initState; public: Vid29Stepper(unsigned int address, AccelStepper& stepper, StepperConfig& stepperConfig, unsigned int (*map_function)(unsigned int)) : Int16Buffer(address), stepper(stepper), stepperConfig(stepperConfig), map_function(map_function), initState(0) { } virtual void loop() { if (initState == 0) { // not initialized yet stepper.setMaxSpeed(stepperConfig.maxSpeed); stepper.setAcceleration(stepperConfig.acceleration); stepper.moveTo(-((long)stepperConfig.maxSteps)); initState = 1; } if (initState == 1) { // zeroing stepper.run(); if (stepper.currentPosition() <= -((long)stepperConfig.maxSteps)) { stepper.setCurrentPosition(0); initState = 2; stepper.moveTo(stepperConfig.maxSteps / 2); } } if (initState == 2) { // running normally if (hasUpdatedData()) { unsigned int newPosition = map_function(getData()); newPosition = constrain(newPosition, 0, stepperConfig.maxSteps); stepper.moveTo(newPosition); } stepper.run(); } } }; // maxSteps maxSpeed acceleration struct StepperConfig apuRpmStepperConfig = {(227 * 2), 300, 1000}; AccelStepper apuRpmStepper(AccelStepper::FULL4WIRE, 9, 12, 8, 3); Vid29Stepper apuRpm(0x10be, apuRpmStepper, apuRpmStepperConfig, [](unsigned int newValue) -> unsigned int { return map(newValue, 0, 65535, 0, apuRpmStepperConfig.maxSteps); }); void setup() { DcsBios::setup(); } void loop() { DcsBios::loop(); }
  12. Updated pcb for VHF AM/FM. New PCB and prototype: I have an extra two pairs, can sell them if someone needs.
  13. Не успел подробно распросить. Сказали, что настоящий перегрузочный костюм, доработанный и подключен к Lockon. Делаешь крутой маневр, например петлю Нестерова - начинает сжимать ноги. А как технически реализовано - не знаю.
  14. Пробовал перегрузочный костюм, когда был в кафе с симулятором Су-27 в Москве. Это хороший вариант, если к нему добавить еще вибронакладку. По цене\реализации\местозаниманию - это отличным компромисс. А потом можно и креслом дополнить, как в первом посте.
  15. I found this switches in Bulletin Board, and wrote to seller, what him want for used 4КНР. Waiting answer from him..
  16. http://asenergi.com/catalog/knopki/kr-kz-knr-knz-kpn.html 4КНР
  17. 4КНР - very expensive, ~90$ for one new original. Best way find analog for them. For stick I want 270$. I can make best photo.
  18. I have stick from Mi-26, if you need, I can sell it for you.
  19. Yes. I use program Sprint Layout for PCB design, you can use the same or another: Eagle, DipTrace, Proteus, etc..
  20. 10$ for one piece, but minimum quote is 5 pieces
  21. On Aliexpress: https://ru.aliexpress.com/item/HQPCB-HQEW-PCB-Prototype-Manufacturing-Laser-Stencils-with-Frame-Quick-Delivery-Free-Shipping/2044986641.html
  22. You can find server-admin and write him about enabling this setting.
  23. Server has setting "player export" disabled. Need enabled.
×
×
  • Create New...