Jump to content

lesthegrngo

Members
  • Posts

    1245
  • Joined

  • Last visited

Everything posted by lesthegrngo

  1. Yep, the DCS.exe file is back in the bin folder - should there be a run.exe file as well? Cheers Les
  2. Cool - then run the cleanup and repair again? ***Edit*** Figured since there was nothing to lose I ran the two again (obviously after adding those to the exclusions) - still no run.exe file Cheers Les
  3. All I have is windows defender, and it was fine this morning. I shut down the PC so I could move the monitor and when I powered up again it was gone. Should I disable Defender? It has worked fine with it for the past two years Cheers for the help Les
  4. Not sure this counts as a game crash as I can't even get it started - for some reason the run.exe file has vanished. I have done the update cleanup and update repair processes, but still no run.exe file. Any help gratefully received Cheers Les
  5. I'm starting to think that a lot of the problems I'm having have something to do with the game PC that DCS World is running on. After all the weird stuff that has gone on, today's new episode is that the DCS run.exe file has disappeared. The only way I can get the game to run now is if I use autoupdate.exe, but it doesn't create a new run.exe file. A search showed that this is something that has happened to other people too, this very forum has instances of it, albeit a few years ago. Has anyone had this recently? If so, how did you resolve it? Cheers Les
  6. You should be talking about about these in the Home Cockpits forum, plenty of people would be interested there Cheers Les
  7. Thanks Supmua I had various goes at making sure the mapping was OK, plus did a load of other stuff like disconnecting bodnar boards and basic stuff including restarting the PC, disconnect and reconnect etc. In the end I went for a DCS Install repair, which fixed it, but I'll have to redo a load of the mapping etc in due course. It actually wasn't as bad as I thought it would be using the install repair process, I expected a lot more collateral issues, but stuff like DCS Bios continues to work fine after Thanks for looking though! Les
  8. Yes, you are right, the omission of the Bodnar boards on this thread was actually somewhat of a deliberate omission on the basis that it's in the home cockpit forum. I guessed that people in this forum would be aware that there were probably other changes and would look at the other post - maybe a bit of a cheeky assumption on my part Nonetheless, nothing I could do could change it and I had to get it working so I tried the DCS install repair function for the first time. It was what I considered the nuclear option as I thought it would wipe all my settings, have to re-install DCS Bios, remap controllers.... Astoundingly it didn't need a reinstall of DCS Bios, but it has reset the default.lua file and wiped the control bindings I had but I'm OK with that as it's restored the joystick function and the control mapping was a WIP anyway due to the need to add two or three more Bodnar boards. I have the modified default.lua files on a USB stick so it's just a question of redoing it once I have all the controls I want in place. It seems that the constant chopping and changing as I added bits to the sim rig changed something somewhere, and I think the final straw was my cack-handed attempts ad trying to get the toggle switches to work correctly. Nice to know that the auto repair is not as bad as I imagined, and it is a safety net Cheers Les
  9. Guys, I've asked this in the Input / Output forum too, but seem to not be getting anywhere with it Basically, the joystick is recognised in the control setup, but in game has no function, and renders the game unplayable. I've reassigned it as primary axis controller, deleted all other inputs for the axes, and gone back and forth through the control setup to ensure nothing else is reporting as the axis, but have got nowhere. I've restarted the game, the computer, disconnected and reconnected the USB cable, nothing. Any advice gratefully received Cheers
  10. Good info, thanks - I am getting there on better understanding, but for sure want to reduce the number of times I have to redo this! Cheers Les
  11. Hi all, I have been adding controls to my sim rig over the last few days, and today when testing it out after adding a fourth Bodnar BBI64 board, apart from seeing the assignments of some the other bodnar boards move to another instance, I now also find that while the HOTAS throttle is being recognised, the joystick is not. The Saitek rudder pedals are OK too. The control screen recognises that there is a Thrustmaster Joystick connected, I can assign the roll and pitch to the respective joystick X and Y axes by moving the joystick, but once you start flying the controls don't work. The controllers being used in game (and recognised by the control setup screen are 4 64 button BBI Bodnar boards Saitek Rudder pedals Thrustmaster HOTAS Throttle Thrustmaster Warthog joystick Logitech USB wireless bluetooth Keyboard with touchpad function Wired USB Dell mouse I have been modifying the dafault.lua file to report 2 position toggle switches, however the joystick.lua file is the untouched original that was working fine yesterday. Anyone got any ideas? Cheers Les
  12. **EDITED** Fixed, now I want to understand why Hi all, I'm taking this out of the 'how to set up toggle switch' thread as I think I wore out my welcome there! I have all the other toggle switches on the electrical panel working as 2 position on/off switches with no problem, but for some reason I was unable to get the floodlight switch to work in that way. This was my logic following the instructions, and I still can't see why what I did was incorrect, even though I know it is. It is the third device in the listing for that particular category, plus the 'clickabledata.lua file lists it as button 3, see the code below from clickabledata.lua elements["PTR-EPP-EMER-FLOOD"] = {class = {class_type.TUMB,class_type.TUMB}, hint = _("Emergency Flood"), device = devices.ELEC_INTERFACE, action = {device_commands.Button_3, device_commands.Button_3}, arg = {243,243}, arg_value = {-1,1}, arg_lim = {{0,1},{0,1}},updatable = true} From the devices.lua, 'ELEC INTERFACE' is device ID 1, and command_defs.lua has the definition as 3 It therefore follows that the line I should put into default.lua is this {down = 3003, up = 3003, cockpit_device_id = 1 , value_down = 1.0, value_up = 0.0, name = _('Cockpit floodlight 2-Pos ON/OFF'), category = _('Electrical power control panel')}, I then start the game, go to controls and assign the appropriate button on the Bodnar BBI, and the controls screen accepts the assignment, but while all the other four devices have accepted and function with the on/off command, the floodlight does not I tried the same line substituting 3003 with 3007 and 3008 all to no avail. As there are already devices with numerical commands of 3001, 3004, 3005 and 3006, and I believe that 3002 is allocated to the Electrical Power Inverter function I believe that I cannot use those. Is my logic path above correct? I found this line in the setup thread {down = 3007, up = 3007, cockpit_device_id = 49 , value_down = 1.0, value_up = 0.0, name = _('Emergency Flood Light 2-Pos DAY/NIGHT'), category = _('Electrical power control panel')}, Device ID 49 pertains to the Lighting system panel, a completely different panel! How should I have made that mental leap, is there something that lists the corresponding switch other than the files mentioned above? Cheers Les
  13. Great, thanks! Les
  14. Thanks for this No1sonUK - with the default.lua file modified I now have the toggle switches working as they should and in line with LeCuvier's description There were some huge gaps in my understanding, and I hadn't grasped that once it was modified in the .lua file that it then had to be selected in game, and of course being set to something other than sim didn't help So I have to thank Fusedspine33, LeCuvier and No1sonUK for their patience and inputs here and behind the scenes, now I have a better grasp on how this functions I can go on to set other controls Cheers again for all the help Les
  15. So the 2 position control selection only appears if you have changed the .lua file? **Edit** I cleared the assignments of those controls, but all the control input options are greyed out apart from the Warthog HOTAS column. None of the other input devices are selectable, even if I set all the switches to non-assigned positions and restart Cheers Les
  16. Well, I think I found why - you stated this "If you have bound (in Controls/Options) your button box switch to "Battery Power 2-Pos ON/OFF"" and I was thinking to myself that I hadn't ever seen that option. When I went to controls setup, sure enough it wasn't there. I did some digging around, and I can only conclude that at some point the game had been taken off simulation mode, as when I went and made sure all the advanced options were checked, the 2 position option is now visible. When the game updates does it change these setting, as I had set them to simulator mode previously. This throws up an interesting point, which is if you are unaware of the existence of something you are unlikely to check it! Now that I know that it is there I have tried to assign the cockpit button to it, but now it will only allow me to assign it to a button on the HOTAS, and won't let me assign it to the Bodnar boards. That's a completely different question that I will take elsewhere, as (I don't think) it's anything to do with modifying the .lua script Cheers Les
  17. Here is a video showing the behaviour I am describing, I will try and attach the .lua file as well .lua file now attached Cheers Les Joystick - HOTAS Warthog.lua.txt
  18. Bizarre - I did not add the extra line, and I have just checked the unmodified .bak file I created before starting an it is in there too. I can only assume that at some point in the past I have done something Let me have another go taking out those parts you state and the spurious repeated section Cheers Les
  19. Thanks for looking at this ***EDIT**** it has just occurred to me that you may not have realised that I am making my own cockpit simulator and so the intent is to actually replicate the physical movement of a real toggle switch - photo of my actual switch panel attached now I confess to being totally confused. The script I used was what you posted before, albeit in a different order, thinking it was a working example. In each case this is what I desire to happen. example - battery power switch The physical switch I have in my real world cockpit is a two position toggle switch. When the switch is in the 'up' position, it is energised, when in the down position it is de-energised. The 'up' position corresponds to 'BATTERY ON', the 'down' position to 'BATTERY OFF'. The intent is that when I put my real toggle switch in the 'up' position, the in game on screen switch should move to the 'BATTERY ON' position, and stay there until I move my real world switch to the 'down' position, and the on screen switch should then move to the 'BATTERY OFF' position. In actual fact, what happens is that starting with my real world switch in the 'down' position, when I move it to the 'up' position, the in game effect is that the on screen toggle switch moves to the opposite position to which it was in, ie when I move my real switch to 'up', if the on screen toggle switch was in the 'BATTERY ON' position, it will move to the 'BATTERY OFF' position and vice versa. When I move my physical switch from the 'up' position to the 'down' position, nothing at all happens. Effectively the real world toggle switch is still being read as a momentary press button switch. As for renaming, again I am really confused - when I look at the names in there I see 'AC generator power right' on one line and 'AC Gen Right Power' on the next line, which to me look like different names. The second one is the same as your example, so again I thought that it was one that was correct or at least OK to use. I hope that I'm explaining this satisfactorily, it's tricky to explain my thoughts sometimes! Cheers Les
  20. Middlefart, do you have the sketch you used with the AX1201728SG driver chip? I am trying to get one of these to work, and using the info on Guy Carpenter's site hasn't got me any further, I seem unable to get the chip to function with the X27-168 stepper. I would like to see if it makes any difference to the quality of movement of the gauges Cheers Les
  21. Hi again Sorry for the delay in responding. I spliced in the code that you gave as examples to test this, on the A10C config, but it isn't functioning. This is how I have inserted the code (obviously the rest of the .lua file is untouched) --Electrical power control panel {down = iCommandAPUGeneratorPower,up = iCommandAPUGeneratorPower, name = _('APU generator power'), category = _('Electrical power control panel')}, {down = 3001, up = 3001, cockpit_device_id = 1 , value_down = 1.0, value_up = 0.0, name = _('APU Gen Power 2-Pos ON/OFF'), category = _('Electrical power control panel')}, {down = iCommandElectricalPowerInverterSTBY , name = _('Inverter STBY'), category = _('Electrical power control panel')}, {down = iCommandElectricalPowerInverterOFF , name = _('Inverter OFF'), category = _('Electrical power control panel')}, {down = iCommandElectricalPowerInverterTEST,up = iCommandElectricalPowerInverterOFF, name = _('Inverter TEST'), category = _('Electrical power control panel')}, {down = iCommandEmergencyFlood , name = _('Emergency flood'), category = _('Electrical power control panel')}, {down = iCommandPowerGeneratorLeft , name = _('AC generator power left'), category = _('Electrical power control panel')}, {down = 3004, up = 3004, cockpit_device_id = 1 , value_down = 1.0, value_up = 0.0, name = _('AC Gen Left Power 2-Pos ON/OFF'), category = _('Electrical power control panel')}, {down = iCommandPowerGeneratorRight , name = _('AC generator power right'), category = _('Electrical power control panel')}, {down = 3005, up = 3005, cockpit_device_id = 1 , value_down = 1.0, value_up = 0.0, name = _('AC Gen Right Power 2-Pos ON/OFF'), category = _('Electrical power control panel')}, {down = iCommandBatteryPower , name = _('Battery power'), category = _('Electrical power control panel')}, {down = 3006, up = 3006, cockpit_device_id = 1 , value_down = 1.0, value_up = 0.0, name = _('Battery Power 2-Pos ON/OFF'), category = _('Electrical power control panel')}, I'm pretty certain that I have put it in correctly, but would appreciate a quick look for anything obvious I also tried it with the value_up command value set to -1.0, again, it didn't work Thanks Les
  22. Ok, I get it, hence using 3006 instead of iCommandBatteryPower Cheers Les
  23. The code is fine - it just looks like the Mega is fussy about what pins the I2C devices are connected to, and this is working fine. Next up, hopefully I can add the the fuel quantity indication OLED to this.... Les
  24. Hi all I'm making some great progress with getting everything working together, and the right console is all mapped and basically working. I'm ploughing through the .lua scripting to set the toggle switch functions properly, hopefully I can get that all working nicely too. I'm trying to use an Arduino Mega board to control everything on the right console, and so far have the OXY supply pressue gauge, test light and CWP all working nicely. However I wanted to add the CMSP LCD display, and the way I have done so isn't working. I have the LCD display connected to one of those PCF8574 backpacks so that I use the SDA and SCL pins on the mega (there are actually two sets) Here's what I have for the code #define DCSBIOS_IRQ_SERIAL //#define DCSBIOS_DEFAULT_SERIAL #include <AccelStepper.h> #include "DcsBios.h" #include <LedControl.h> #include <Wire.h> #include <LiquidCrystal_PCF8574.h> LiquidCrystal_PCF8574 lcd(0x27); // set the LCD address to 0x27 for a 16 chars and 2 line display int show; void onCmsp1Change(char* newValue) { lcd.setCursor(0, 0); lcd.print(newValue); } DcsBios::StringBuffer<19> cmsp1Buffer(0x1000, onCmsp1Change); void onCmsp2Change(char* newValue) { lcd.setCursor(0, 1); lcd.print(newValue); } DcsBios::StringBuffer<19> cmsp2Buffer(0x1014, onCmsp2Change); 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(); } } }; /* modify below this line */ /* define stepper parameters multiple Vid29Stepper instances can share the same StepperConfig object */ struct StepperConfig stepperConfig = { 500, // maxSteps 200, // maxSpeed 8000 // acceleration }; // note cs im testing with 11 going to step (middle on easy drier) and 10 doing to direction (right on easy driver) // cs so in the code going on the basis that the first named number is step and the second is direction // define AccelStepper instance AccelStepper stepper(AccelStepper::DRIVER, 3, 2); // define Vid29Stepper class that uses the AccelStepper instance defined in the line above // +-- arbitrary name // | +-- Address of stepper data (from control reference) // | | +-- name of AccelStepper instance // v v v v-- StepperConfig struct instance Vid29Stepper oxyPressBuffer(0x1130, stepper, stepperConfig, [](unsigned int newValue) -> unsigned int { /* this function needs to map newValue to the correct number of steps */ return map(newValue, 0, 65535, 0, stepperConfig.maxSteps); }); LedControl lc=LedControl(52,48,50,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]; DcsBios::LED oxyFlow(0x112a, 0x0800, 4); void setup() { lcd.begin(16, 2); lcd.clear(); DcsBios::setup(); memset(max7219_rows, 0xff, sizeof(max7219_rows)); lc.shutdown(0,false); //turn on the display lc.setIntensity(0,15);//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(); lcd.setBacklight(10); } If anyone can spot any glaring errors please advise, it does compile OK for fro a Mega but the CMSP LCD display isn't playing along Cheers Les
  25. One further question, the new code replaces the old, correct? so if I put in {down = 3006, up = 3006, cockpit_device_id = 1 , value_down = 1.0, value_up = 0.0, name = _('Battery Power 2-Pos ON/OFF'), category = _('Electrical power control panel')}, I have to delete the associated line {down = iCommandBatteryPower, name = _('Battery power'), category = _('Electrical power control panel')}, I don't want to delete the line even if it appears to work only to find that there is a hidden effect that causes other issues Cheers Les
×
×
  • Create New...