Jump to content

lesthegrngo

Members
  • Posts

    1245
  • Joined

  • Last visited

Everything posted by lesthegrngo

  1. Thanks, I was able to get this done. All working well, apart from when I forgot to define the extra screen height... Now my attention is on the IAS indicator, which I remember is built up of various bits (back, needle, surround, marker from memory). The problem is that I now can't open any of Capt Zeen's profiles - they crash the profile editor program when you try to open them. The intention was to try and copy them across, or at least use for reference, but they seem to be incompatible with my Helios install (Version 1.4.2019.1005) Is this something that has been seen by others? Cheers Les
  2. Resolved this, redefining the desktop allowed me to get this done Thanks for the help guys, but again I need a bit of help understanding why the taskbar is appearing on some of the monitors but not others in game. Is there any way to make the taskbar invisible in game? Les
  3. 0xA0 is the one that worked in this instance Agreed as well, I have taken so much from this forum and feel like I have given very little back, hopefully with time that can be remedied Cheers
  4. Thanks Tekkx, I was using notepad++ as it was recommended in the tutorial. I can now get the options screen to show my modified .LUA file However that doesn't appear to have cured it. Essentially I am using the basic tutorial on Helios to try and get the RWR to show. I have edited the AN_ALR69V_init.lua file to tell it to try and find the ED_A10C_RWR viewport plus the common viewport handling .lua. The MonitorSetup.LUA file references the ED_A10C_RWR and puts it to the right of the main screen, but nothing is showing. Still ploughing through it, I know an error in placement can throw it all, but so far no joy. If there is a more up to date tutorial on how to display the RWR I would love to take a look Cheers Les
  5. Putting that argument in in the beginning of the display lines in Void loop worked! Thanks a million, I'm going to owe you a lot of beer by the time this project is done! Cheers Les
  6. Thanks - I would have stared at that forever and not seen it! Cheers Les
  7. Sounds like a project, after my little problems with RS485 I am willing to give it a go! Cheers
  8. Guy, I am trying to get the RWR to display on a small screen, but for some reason any .LUA file I modify and save to the directory simply fails to appear in the drop down menu of available files. I'm using notepad++ to modify them, and yesterday I could add them and they would appear, today... nothing. Is it possible I have inadvertently changed a setting somewhere, or are there characters that cannot be used? Here's the code I am using _ = function(p) return p; end; name = _('CameraOnescreenother'); Description = 'Center screen and RWR on right' Viewports = { Center = { x = 0; y = 0; width = 2560; height = 1080; viewDx = 0; viewDy = 0; aspect = 2.37037037; } } RWR_SCREEN = { x = screen.width 2570; y = screen.height 0; width = 610; height = 610; } UIMainView = Viewports.Center GU_MAIN_VIEWPORT = Viewports.Center I am saving it as Camera_for_single_screen_other.lua what am I doing wrong? Cheers Les
  9. Here you go Vinc #define DCSBIOS_IRQ_SERIAL #include <DcsBios.h> #include <SPI.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 32 // OLED display height, in pixels // Declaration for an SSD1306 display connected to I2C (SDA, SCL pins) #define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin) Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); #if (SSD1306_LCDHEIGHT != 32) #error("Height incorrect, please fix Adafruit_SSD1306.h!"); #endif char* displayString = "----"; // onDcsBiosWrite does not exist anymore, use Int16Buffers instead DcsBios::Int16Buffer altPressure0Buffer(0x1086); DcsBios::Int16Buffer altPressure1Buffer(0x1088); DcsBios::Int16Buffer altPressure2Buffer(0x108a); DcsBios::Int16Buffer altPressure3Buffer(0x108c); void setup() { display.begin(SSD1306_SWITCHCAPVCC, 0x3C); display.clearDisplay(); DcsBios::setup(); } void loop() { DcsBios::loop(); if (altPressure0Buffer.hasUpdatedData()) { displayString[3] = mapeo(altPressure0Buffer.getData()); } if (altPressure1Buffer.hasUpdatedData()) { displayString[2] = mapeo(altPressure1Buffer.getData()); } if (altPressure2Buffer.hasUpdatedData()) { displayString[1] = mapeo(altPressure2Buffer.getData()); } if (altPressure3Buffer.hasUpdatedData()) { displayString[0] = mapeo(altPressure3Buffer.getData()); } display.clearDisplay(); display.setTextSize(2); display.setTextColor(WHITE); display.setCursor(0,5); display.print(displayString); display.display(); delay (75); } char mapeo(unsigned int valor){ if (valor < 6553) { return '0'; } if (valor < 13107) { return '1'; } if (valor < 19660) { return '2'; } if (valor < 26214) { return '3'; } if (valor < 32767) { return '4'; } if (valor < 39321) { return '5'; } if (valor < 45874) { return '6'; } if (valor < 52428) { return '7'; } if (valor < 58981) { return '8'; } return '9' ; } And for completeness this is the code for the working Altimeter OLED (although poor definition numbers and without that cool scrolling that Middlefart managed to incorporate). As you can see apart from the text size and references the OLED screen resolution it is essentially the same #define DCSBIOS_IRQ_SERIAL #include <DcsBios.h> #include <SPI.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 64 // OLED display height, in pixels // Declaration for an SSD1306 display connected to I2C (SDA, SCL pins) #define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin) Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); #if (SSD1306_LCDHEIGHT != 32) #error("Height incorrect, please fix Adafruit_SSD1306.h!"); #endif char* displayString = "---"; // onDcsBiosWrite does not exist anymore, use Int16Buffers instead DcsBios::Int16Buffer alt10000ftCounter(0x1080); DcsBios::Int16Buffer alt1000ftCounter(0x1082); DcsBios::Int16Buffer alt100ftCounter(0x1084); void setup() { display.begin(SSD1306_SWITCHCAPVCC, 0x3C); display.clearDisplay(); DcsBios::setup(); } void loop() { DcsBios::loop(); if (alt10000ftCounter.hasUpdatedData()) { displayString[0] = mapeo(alt10000ftCounter.getData()); } if (alt1000ftCounter.hasUpdatedData()) { displayString[1] = mapeo(alt1000ftCounter.getData()); } if (alt100ftCounter.hasUpdatedData()) { displayString[2] = mapeo(alt100ftCounter.getData()); } display.clearDisplay(); display.setTextSize(6); display.setTextColor(WHITE); display.setCursor(10,10); display.print(displayString); display.display(); delay (75); } char mapeo(unsigned int valor){ if (valor < 6553) { return '0'; } if (valor < 13107) { return '1'; } if (valor < 19660) { return '2'; } if (valor < 26214) { return '3'; } if (valor < 32767) { return '4'; } if (valor < 39321) { return '5'; } if (valor < 45874) { return '6'; } if (valor < 52428) { return '7'; } if (valor < 58981) { return '8'; } return '9' ; } Cheers Les
  10. Sorry, I meant as output to the stepper drivers Cheers
  11. I have been trying to get the RWR to appear on my screen using MonitorSetup.lua , and can't get it to display. The two MFCD's are appearing fine, but no matter where I position the RWR, nothing, just a blank bit of screen This is the text I am using in the .lua file (numbers are different but you can see the syntax and wording) RWR_SCREEN = { x = 5586; y = 141; width = 200; height = 200; } Is there a missing part of the script? Cheers Les
  12. Cool, great tip Vinc! Would it work with stepper motor outputs too? Cheers
  13. All, I successfully got multiple i2c based (PCF8574 back pack) LCD displays to run from one nano. It's a lot easier than I expected, and I have three identical 0801 LCDs running off one Nano. Essentially all the boards I used had the same address as far as the arduino is concerned (0x27 from memory) so the arduino couldn't tell them apart. If you used i2cscanner it will display the address of the device that is pluged in. On each PCF back pack there are three sets of solder pads, A0, A1 & A2. By bridging the individual pairs with a blob of solder, it changes the address i2c sees. As an example, bridging the A0 pads changed the address to 0x26, and bridging the A1 pads changed it to 0x25. All the PCF contacts are wired to the same pins, so join via four rails, GND, VCC, SDA and SCK, so really simple The code was simple enough to change with references to lcd being replaced by lcd0, lcd1, lcd2 etc. I will post a sketch showing this. ****EDIT**** Here's the sketch #include <Wire.h> #include <LiquidCrystal_PCF8574.h> #define DCSBIOS_IRQ_SERIAL #include <DcsBios.h> LiquidCrystal_PCF8574 lcd0(0x27); // set the LCD address to 0x27 for a 16 chars and 2 line display LiquidCrystal_PCF8574 lcd1(0x26); LiquidCrystal_PCF8574 lcd2(0x25); int show; void onCmscTxtJmrChange(char* newValue) { lcd0.setCursor(0, 0); lcd0.print(newValue); } DcsBios::StringBuffer<8> cmscTxtJmrBuffer(0x1096, onCmscTxtJmrChange); void onCmscTxtChaffFlareChange(char* newValue) { lcd1.setCursor(0, 0); lcd1.print(newValue); } DcsBios::StringBuffer<8> cmscTxtChaffFlareBuffer(0x108e, onCmscTxtChaffFlareChange); void onCmscTxtMwsChange(char* newValue) { lcd2.setCursor(0, 0); lcd2.print(newValue); } DcsBios::StringBuffer<8> cmscTxtMwsBuffer(0x12b0, onCmscTxtMwsChange); void setup() { lcd0.begin(16, 2); lcd1.begin(16, 2); lcd2.begin(16, 2); DcsBios::setup(); } void loop() { DcsBios::loop(); lcd0.setBacklight(5); lcd1.setBacklight(5); lcd2.setBacklight(5); } Hope this helps someone Cheers Les
  14. Yes, the 5v feed from my arduino Nano is the power source for the LED's. On my A10C central warning panel which runs off a Max 7219 driven by a nano, I have 144 green 0805 SMD LED's and the setup is capable of lighting them all. I think it multiplexes the LED's so they are not all lit at the same time, but flash so rapidly it looks like it On my undercarriage indicator lights I drive three 'pirahna' type LED's direct from the nano (obviously no Max7219 for that) so the arduinos are capable. However you could always try and use a MOSFET module (look up Arduino Mosfet module on fleabay) as that allows you to power the LED's and other devices with a separate power supply with the Arduino using the Mossfet as a switch Hope this helps! Les As far as I am aware
  15. Guys, I got the 0.96" OLED working for the altimeter readout fine, but when I tried to use the same sketch fon a 0.87" 128 x 32 OLED module adjusted for resolution, it displays the numerals mirrored, so that to see them correctly you have look at a reflection. Any ideas why this woul happen? Apart from the resolution the sketch is the same, and both modules are i2c bought from buydisplay Cheers Led
  16. Had a go with this on my rig, and it's cool, but maybe not what I wanted. I want the option to be able to check a box, or put a number in a box so that either a command takes place (eg light a particular warning lamp) or a gauge output commands so that the gauge will move to the relevant position. That way, you can check that the particular light goes on when it's supposed to, and you can also check the zero, 100% and mid positions of a gauge, so that you can enter the right ranges in the Bios sketch. Anyway, it's still very good! Cheers Les
  17. I used one of those type. Make sure you don't get the polarity (VCC / GND) the wrong way round, I bricked one by doing that by accident. After that every segment was on and stayed on Cheers Les
  18. Just been through this with my A10 cockpit. I used an 8 digit seven segment LED display running off a Max7219 board, and this is the sketch that I used for the UHF radio repeated on the dash. It's essentially a rewrite of Craig's sketch for just one module, try swapping in the DSC Bios part you need for the particular unit /* Tell DCS-BIOS to use a serial connection and use interrupt-driven communication. The main program will be interrupted to prioritize processing incoming data. This should work on any Arduino that has an ATMega328 controller (Uno, Pro Mini, many others). */ #define DCSBIOS_IRQ_SERIAL #include <LedControl.h> #include <DcsBios.h> // 8 DIGIT 7 SEGMENT DISPLAY - UHF RADIO //pin 3 is connected to the DataIn //pin 5 is connected to the CLK //pin 4 is connected to LOAD / CS LedControl lc=LedControl(3,5,4,1); //This creates an instance of a single controller named "lc" // GENERAL REF NOTE BELOW /* The sequence of pins used above are in the following order... LedControl(DIN,CLK,LOAD,# OF IC's) pin X is connected to the DataIn pin X is connected to the CLK pin X is connected to LOAD the last number...(1) is for how many MAX7219 we have daisy chained. (8 STATED, HOWEVER 4 ACTUALLY PRESENT) */ void onUhfFrequencyChange(char* newValue) { lc.setChar(0,7,newValue[0],false); lc.setChar(0,6,newValue[1],false); lc.setChar(0,5,newValue[2],false); lc.setChar(0,4,newValue[3],false); lc.setChar(0,3,newValue[4],false); lc.setChar(0,2,newValue[5],false); lc.setChar(0,1,newValue[6],false); } DcsBios::StringBuffer<7> uhfFrequencyBuffer(0x1180, onUhfFrequencyChange); void setup() { DcsBios::setup(); // MAX7219 INITIALISATION //This initializes the MAX7219 and gets it ready for use: //FIRST - 8 DIGIT 7 SEGMENT DISPLAY - VHF-AM RADIO (CODE) MAX7219 INITIALISATION lc.shutdown(0,false); //turn on the display lc.setIntensity(0,8);//set the brightness lc.clearDisplay(0); //clear the display //FIRST - 8 DIGIT 7 SEGMENT DISPLAY - VHF-AM RADIO (CODE) MAX7219 BOOT CODE WHILST AWAITING SOCAT DATA STREAM // lc.setChar(0,7,'A',false); lc.setChar(0,6,'1',false); lc.setChar(0,4,'0',false); lc.setChar(0,3,'c',false); } void loop() { DcsBios::loop(); } Hope this helps, I know other have helped me so want to pass on their help Cheers Les
  19. Hi Vinc, finally got round to trying this. Unfortunately those modified font files don't seem to change anything. Thanks for trying though! Les
  20. I have managed to get the OLED's working, however they don't look as good as what you have in your video - the way you have the text scrolling looks much better than my effort. How did you manage to get it to scroll so well? Cheers Les
  21. Hi guys, me yet again As usual my issue is getting the sketches to work when the hardware is slightly different. I'm using a buysdisplay 0.96" 128 x 64 display, but I also want to use a 0.87" OLED module. Trying to use the code above this is what I got to that works OK // tell DCS-BIOS we want interrupt-based serial comms. How to do this will probably change in the future. #define DCSBIOS_IRQ_SERIAL #include <DcsBios.h> #include <SPI.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 64 // OLED display height, in pixels // Declaration for an SSD1306 display connected to I2C (SDA, SCL pins) #define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin) Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); #if (SSD1306_LCDHEIGHT != 32) #error("Height incorrect, please fix Adafruit_SSD1306.h!"); #endif char* displayString = "---"; // onDcsBiosWrite does not exist anymore, use Int16Buffers instead DcsBios::Int16Buffer alt10000ftCounter(0x1080); DcsBios::Int16Buffer alt1000ftCounter(0x1082); DcsBios::Int16Buffer alt100ftCounter(0x1084); void setup() { display.begin(SSD1306_SWITCHCAPVCC, 0x3C); display.clearDisplay(); DcsBios::setup(); } void loop() { DcsBios::loop(); if (alt10000ftCounter.hasUpdatedData()) { displayString[0] = mapeo(alt10000ftCounter.getData()); } if (alt1000ftCounter.hasUpdatedData()) { displayString[1] = mapeo(alt1000ftCounter.getData()); } if (alt100ftCounter.hasUpdatedData()) { displayString[2] = mapeo(alt100ftCounter.getData()); } display.clearDisplay(); display.setTextSize(6); display.setTextColor(WHITE); display.setCursor(5,0); display.print(displayString); display.display(); delay (75); } char mapeo(unsigned int valor){ if (valor < 6553) { return '0'; } if (valor < 13107) { return '1'; } if (valor < 19660) { return '2'; } if (valor < 26214) { return '3'; } if (valor < 32767) { return '4'; } if (valor < 39321) { return '5'; } if (valor < 45874) { return '6'; } if (valor < 52428) { return '7'; } if (valor < 58981) { return '8'; } return '9' ; } This works on the 0.96" module, with a max text size of 6, anything bigger and it clips. However the numerals displayed are very crude and blockish, presumably due to the bitmap character library being equally crude, so I would like to know if there is a better library I can use for this. It also strangely will not load on a Nano board, with an error message that it is too big coming up. I have it on an Uno board, on which it works fine. Is there something that I can do to reduce it so that it fits on the Nano? **EDIT** tried on another Nano board and it compiled fine - no idea why Lastly I tried with the 0.87" module, and there things get a bit weird. I can get it to display by reducing the character size, but it displays the characters back to front, by which I mean it looks like you are looking at them in a mirror. As I want to modify the sketch for use with the Fuel Quantity indication and the pressure indication, I need this to display correctly, so does anyone have any ideas what is causing it? This video here shows what I would ultimately like to do The scrolling of the digits is a great touch, and I downloaded the sketch and the bespoke libraries, and tried to reverse engineer what he had done with what I managed to get working above, this sketch being the result. I worked through a load of the error messages by installing some libraries within the Adafruit one /* Based on the Adafruit_SSD1306 library demo and the DCS-BIOS template sketch. This is meant to be compiled with Energia and to run on a Texas Instruments Tiva C Series Launchpad board. It should run on an Arduino (adjust the #defines accordingly to specify the pins you used), but I have not tested whether the 16 MHz AVR is fast enough. The Tiva C Launchpad has an 80 MHz ARM processor. The fonts are not perfectly aligned because they were made in a hurry to get a proof of concept... */ #include <SPI.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #include <DcsBios.h> #include <Servo.h> #include "digits_32x64.cpp" #include "digits_00_32x64.cpp" #include "digits_1to9_32x64.cpp" #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 64 // OLED display height, in pixels // Declaration for an SSD1306 display connected to I2C (SDA, SCL pins) #define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin) Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); // If using software SPI (the default case): //#define OLED_MOSI PE_1 //#define OLED_CLK PE_2 //#define OLED_DC PD_3 //#define OLED_CS PB_7 //#define OLED_RESET PD_2 //Adafruit_SSD1306 display(OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS); DcsBios::ProtocolParser parser; 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 setup() { //Serial.begin(500000); 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() { while(Serial.available()) parser.processChar(Serial.read()); } 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); } } Unfortunately it just gives errors at the end, saying it's unable to compile for either of the arduinos, which is a shame as it would have been great to have a working version Cheers Les
  22. Nice, thanks! Cheers Les
  23. Got this working, there were two errors in my mapping, one due to my matrix PCB having two pins transposed due to ease of production needs, and another due to me reading the columns back to front - the contacts came back through the board so I mistakenly mirrored the input pins in the sketch. It's looking great, again many thanks to everyone for their help Cheers Les
  24. Hi again guys. I have the CWP working, however it's clear that the mapping of the lights is not right for my sketch, as the wrong lights go on when DCS illuminates a particular one. This is the sketch that's working #define DCSBIOS_IRQ_SERIAL #include <DcsBios.h> #include <LedControl.h> //pin 11 is connected to the DataIn //pin 13 is connected to the CLK //pin 10 is connected to LOAD LedControl lc=LedControl(3,5,4,1);//DIN,CLK,LOAD,# OF IC's unsigned char cl_row_map[48] = { 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, }; #define SEG_DP (1<<7) #define SEG_A (1<<6) #define SEG_B (1<<5) #define SEG_C (1<<4) #define SEG_D (1<<3) #define SEG_E (1<<2) #define SEG_F (1<<1) #define SEG_G (1<<0) unsigned char cl_mask_map[48]= { SEG_C, SEG_D, SEG_F, SEG_A, SEG_C, SEG_D, SEG_F, SEG_A, SEG_C, SEG_D, SEG_F, SEG_A, SEG_C, SEG_D, SEG_F, SEG_A, SEG_C, SEG_D, SEG_F, SEG_A, SEG_C, SEG_D, SEG_F, SEG_A, SEG_DP, SEG_G, SEG_E, SEG_B, SEG_DP, SEG_G, SEG_E, SEG_B, SEG_DP, SEG_G, SEG_E, SEG_B, SEG_DP, SEG_G, SEG_E, SEG_B, SEG_DP, SEG_G, SEG_E, SEG_B, SEG_DP, SEG_G, SEG_E, SEG_B, }; unsigned char max7219_rows[8]; void setup() { DcsBios::setup(); memset(max7219_rows, 0xff, sizeof(max7219_rows)); lc.shutdown(0,false); //turn on the display lc.setIntensity(0,8);//set the brightness lc.clearDisplay(0); //clear rthe display and get ready for new data } void updateCautionLights(unsigned int address, unsigned int data) { unsigned char clp_row = (address - 0x10d4) * 2; unsigned char start_index = clp_row * 4; unsigned char column = 0; unsigned char i; bool is_on; for (i=0; i<16; i++) { is_on = data & 0x01; // set caution light state (clp_row, column, is_on) if (is_on) { max7219_rows[cl_row_map[start_index+i]] |= cl_mask_map[start_index+i]; } else { max7219_rows[cl_row_map[start_index+i]] &= ~(cl_mask_map[start_index+i]); } data >>= 1; column++; if (column == 4) { clp_row++; column = 0; } } } void onClpData1Change(unsigned int newValue) { updateCautionLights(0x10d4, newValue); } DcsBios::IntegerBuffer clpData1(0x10d4, 0xffff, 0, onClpData1Change); void onClpData2Change(unsigned int newValue) { updateCautionLights(0x10d6, newValue); } DcsBios::IntegerBuffer clpData2(0x10d6, 0xffff, 0, onClpData2Change); void onClpData3Change(unsigned int newValue) { updateCautionLights(0x10d8, newValue); } DcsBios::IntegerBuffer clpData3(0x10d8, 0xffff, 0, onClpData3Change); void loop() { DcsBios::loop(); // update MAX7219 unsigned char i; for (i=0; i<8; i++) { lc.setRow(0, i, max7219_rows[i]); } } So it seems to me that my mapping addresses are wrong, so firstly this is how the PCB is currently wired up to the MAX7219 pins (matrix in pinout connected, DIGX / SEGX) 0/ SEG_C, 0/ SEG_D, 0/ SEG_F, 0/ SEG_A, 1/ SEG_C, 1/ SEG_D, 1/ SEG_F, 1/ SEG_A, 2/ SEG_C, 2/ SEG_D, 2/ SEG_F, 2/ SEG_A, 3/ SEG_C, 3/ SEG_D, 3/ SEG_F, 3/ SEG_A, 4/ SEG_C, 4/ SEG_D, 4/ SEG_F, 4/ SEG_A, 5/ SEG_C, 5/ SEG_D, 5/ SEG_F, 5/ SEG_A, 0/ SEG_DP, 0/ SEG_G, 0/ SEG_E, 0/ SEG_B, 1/ SEG_DP, 1/ SEG_G, 1/ SEG_E, 1/ SEG_B, 2/ SEG_DP, 2/ SEG_G, 2/ SEG_E, 2/ SEG_B, 3/ SEG_DP, 3/ SEG_G, 3/ SEG_E, 3/ SEG_B, 4/ SEG_DP, 4/ SEG_G, 4/ SEG_E, 4/ SEG_B, 5/ SEG_DP, 5/ SEG_G, 5/ SEG_E, 5/ SEG_B, Some are transposed, for example the left and right wing and main pumps - left light actually illuminates right light. Others are one row below where they should be, and then some just don't light at all. So I am wondering whether I am getting the syntax of the mapping right. I am treating it like two four wide by six deep matrices, one on top of another, and that maybe I should be treating it as them being side by side? Cheers Les
  25. Thanks, will have a bash at that Cheers Les
×
×
  • Create New...