Recent Posts

Pages: 1 2 3 4 [5] 6 7 8 ... 10
41
Other Open Source Projects / Re: Standalone Tank IR
« Last post by Rongyos on January 06, 2024, 05:16:57 PM »
Hi Luke!

Thank you for your support! I will try it tomorrow and share the results of your modifications :)



As for increasing the length of the tank destroyed period, it is set to 15 seconds because that is the Tamiya standard. However if you want to change it, modify this value near the top of the Tank.h tab:
Code: [Select]
// Tanks is dead for 15 seconds
#define DESTROYED_INOPERATIVE_TIME_mS   15000   // How long is the vehicle immobilized after being destroyed. 15 seconds is the Tamiya spec. After this,
                                                // the vehicle will automatically re-generate with full health restored.
No, maybe I was not understandable, sorry if my English is not perfect. For me the "tankdestroyed" notify LED effects were very similar to simple hit notification. I just wanted some longer blinking after destroy to make it more clear for the user that the tank is out. If I modify this can I reach my goal? (More blinking time, significantly longer than simple hit notification, the value was 450ms before thats what your comment also said :) )

Code: [Select]
// Now set a timer to keep coming back here after a short interval so we can blink the lights
        DestroyedBlinkerID = TankTimer->setInterval(5450, HitLEDs_Destroyed);     // This is a slow blink, about half a second

I guess you are using the manual pushbutton method to trigger the canon fire? Most people probably use the signal input so I suppose that is why we haven't caught this issue before.
I will update the documentation to make this more clear.

Thanks Luke, my plan was to use the 4th pin of the regular 8pin connector which is the airsoft signal pin. It sends out gnd signal, so thats why I used INPUT_PULLUP function to trigger the cannon fire. I don't need the 5V receiving pin because of this. Achieving my plan will let the users use this unit with older Heng Long and Taigen boards (they just need to extend the 4th wire and connect to relevant connector to the battle unit). I also have 2 Taigens and my test were good except the "phantom firing", but with the simple solution from my friend it disappeared!
I will test your led modifications and let you know!

Thanks and regards
Rongyos
42
Other Open Source Projects / Re: Standalone Tank IR
« Last post by LukeZ on January 06, 2024, 11:31:16 AM »
Can I ask something? Can you add a simple led blink on HitLeds when cannon reloaded and a little bit longer blinking when tank destroyed?

Hi Rongyos, I've posted an update to the firmware to GitHub, there is now the option to have the apple Hit LEDs blink when the cannon reload time has completed. By default it is off, you can set it to true in the A_Setup.h file near the top. 
Code: [Select]
    // NOTIFICATION LED
    // --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->>
    //
    #define CANNON_RELOAD_NOTIFY    false                   // << --- SET ME - set to True to blink the IR apple notification LEDs when canon reload time has transpired (CUSTOM_CANNON_RELOAD below)
 


I'm not sure how long the blink should be, and I don't have an Arduino right now to test. Currently it is set to 250mS, which is only 1/4 of a second. If you want to increase the time, modify this function at the very bottom of Tank.cpp:
Code: [Select]
//------------------------------------------------------------------------------------------------------------------------>>
// HIT NOTIFICATION LEDs CANON RELOADED - Short blink to notify  user the canon reload time has completed
//                                        Can be enabled/disabled with setting CANNON_RELOAD_NOTIFY on the A_Setup.h tab
//------------------------------------------------------------------------------------------------------------------------>>
void OP_Tank::HitLEDs_ReloadNotify(void)
{   
    HitLEDs_Blink(250);
}


As for increasing the length of the tank destroyed period, it is set to 15 seconds because that is the Tamiya standard. However if you want to change it, modify this value near the top of the Tank.h tab:
Code: [Select]
// Tanks is dead for 15 seconds
#define DESTROYED_INOPERATIVE_TIME_mS   15000   // How long is the vehicle immobilized after being destroyed. 15 seconds is the Tamiya spec. After this,
                                                // the vehicle will automatically re-generate with full health restored.


Finally, with regard to the "phantom firing" - I probably should have made this more clear, though it is shown in the included sample schematic PDF - but you need to place a resistor between A0 and ground. 10k is shown in the schematic though the value is not important.

What you have done by setting A0 (pin_VoltageTrigger) to OUTPUT will also work, but then of course you would have to change that if you were going to use this pin in the future as an input signal from some other MFU.

I guess you are using the manual pushbutton method to trigger the canon fire? Most people probably use the signal input so I suppose that is why we haven't caught this issue before.

I will update the documentation to make this more clear.
43
Other Open Source Projects / Re: Standalone Tank IR
« Last post by Rongyos on January 04, 2024, 12:53:03 PM »
I have a suspicion this is related to the Arduino IDE version issue that was discussed earlier in this thread. With certain versions of the IDE the code will compile but without enough memory available, and the sketch will operate very erratically, if at all.

You were right, I try to get stable 5v from anywhere, uploaded sketch to 4 different nanos and so on but didn't find that solution :) Thanks, everything working. I downloaded the IDE 1.8.5 and board 1.6.20

Can I ask something? Can you add a simple led blink on HitLeds when cannon reloaded and a little bit longer blinking when tank destroyed?

I tried the reload blink like this, but no success:

Code: [Select]
void OP_Tank::HitLEDs_Reloaded(void)
{   
    if (CannonReloaded)
    {
        HitLEDs_Toggle();
    }
    else
    {   
        if (TankTimer->isEnabled(HitLED_TimerID)) TankTimer->deleteTimer(HitLED_TimerID);
        HitLEDs_Off();
    }

Also, look at the test, I call it "almost there" :) Unfortunately, fantom firing is still there :(

Code: [Select]
19:07:13.025 -> BATTLE INFO
19:07:13.025 -> ---------------------------------------------
19:07:13.025 -> Is Repair Tank?   No
19:07:13.025 -> Fire Protocol:    Tamiya
19:07:13.025 -> Hit Protocol 2:   Heng Long
19:07:13.025 -> Repaired by:      Clark Repair
19:07:13.025 -> Send MG IR Code:  No
19:07:13.025 -> Accept MG Damage: No
19:07:13.071 -> Damage Profile:   Tamiya Spec
19:07:13.071 -> Weight Class:     Medium
19:07:13.071 -> (6 cannon hits, 5.0 sec reload, 12.0 sec recovery)
19:07:13.071 ->
19:07:13.071 ->
19:07:13.071 ->


19:07:15.205 -> Fire Cannon


19:07:31.516 -> CANNON HIT! (Tamiya)
19:07:31.516 -> Health Level: 83%
19:07:41.921 -> CANNON HIT! (Tamiya)
19:07:41.921 -> Health Level: 67%
19:07:52.162 -> CANNON HIT! (Tamiya)
19:07:52.162 -> Health Level: 50%
19:08:02.223 -> CANNON HIT! (Tamiya)
19:08:02.223 -> Health Level: 33%
19:08:12.900 -> CANNON HIT! (Tamiya)
19:08:12.900 -> Health Level: 17%
19:08:23.038 -> CANNON HIT! (Tamiya)
19:08:23.038 -> Health Level: 0%
19:08:33.440 -> CANNON HIT! (Tamiya)
19:08:33.440 -> Health Level: 0%
19:08:33.440 -> TANK DESTROYED
19:08:48.467 -> TANK RESTORED

EDIT: I tried to rewrite the button state on the TankIR loop from wasReleased to isPressed and wasPressed, no success
I use INPUT_PULLUP pinmode for my input pin, changed back to INPUT but phantom firing still there. Don't know whats next. Of course, there is no periphery attached to arduino when I checked this on tests, only the Nano was attached to USB.


My friend helped me. I set the VoltageTrigger to OUTPUT and no phantom firing occured :)
44
Other Open Source Projects / Re: Standalone Tank IR
« Last post by LukeZ on January 04, 2024, 11:45:37 AM »
Hi Rongyos,

I have a suspicion this is related to the Arduino IDE version issue that was discussed earlier in this thread. With certain versions of the IDE the code will compile but without enough memory available, and the sketch will operate very erratically, if at all.

The solution is listed in that post, or again on this page of GitHub under the "Compiling Firmware" section.

So I would suggest following the instructions of opening the Boards Manager in the Arduino IDE, finding the Arduino AVR Boards section, and then installing boards version 1.6.20 and try recompiling and see if that makes a difference. This could explain several of the problems you're seeing.

An other question. Do you know where can I get constant 5V from the Taigen V3 MFU? It seems the CN2 is only providing around 1.8V
I don't have one to test, but I believe you should be able to find 5 volts from the sound card port, and possibly also the IR port. I can't say which pin is what, but you can use a multimeter to verify. However, I can't say  how clean the voltage will be from the Taigen MFU, and it might be better to use a 5v regulator to power your receiver and Nano.
45
TCB Dev / Re: QtAssistant/Help Files
« Last post by FuzzyJack on January 04, 2024, 02:45:54 AM »
I haven't gotten to actually look at how the application is being built yet to include the assistant and the help_files and plugins and things.   

It doesn't included them by default in the debug build for the application so I assume this is done as part of the actual build process of the installer/exe program iself.

I haven't found any notes yet on how Luke did this other than he didn't use the Qt build tool itself.

If you see this and have any pointers Luke that would be appreciated.  I can work around it by just copying the right files/folders into the debug folder for now anyway to poke things :-)
46
TCB Dev / QtAssistant/Help Files
« Last post by FuzzyJack on January 04, 2024, 02:42:40 AM »
Following previous conversations about the OP Config tool, I have been having a nosey at the Qt Assistant issue and why the help files no longer work.

Turns out the use of QtAssistant is more intended to be used on machine that has Qt installed specifically but you can (and as Luke has) bundle the Assistant application as part of the build.   There is also a QtHelpFile API in the Qt suite now that can be used to display the content of helpfiles within any type of window you like but will take a look at that later.

Poking the current deployed version of OPConfig on my machine I have tried to launch the qch collection file using the Assistant.exe included in the build and get a library error initially (see attached files) but that is because I ran the assistant from within the assistant folder.  The library file it moans about is in the main directory and if you run the assistant from there it works although the actual display then has no content.

The actual application uses assistant\assistant to call the tool anyway so that's probably correct, why the qch file appears to be empty is different.

I get the same if I use the actual QtAssistant on my Qt install to point at the deployed qch file as well so not sure why the qch file would be empty or perhaps it is just because I haven't specified a page in the call but on a newly generated qch I don't need to so that's strange.

If I generate a new qch file in the source I get output but most of the links in the TOC don't actually work and try to open an "untitled".   Turns out in the qhp file each of the sections is referenced using .\ in the file location which appears not to be working.   removing the .\ renders the section links operable again.

e.g.
<section title="Program Layout" ref="./formlayout.html"></section>   -- doesn't work
<section title="USB Drivers" ref="drivers.html"></section>                -- works

I'm also getting some interesting output in some of the help files where certain graphics or links are used (DodgyGraphics.png).

The HTML file itself displays fine so it looks like rendering of the h4 heading type in the css is a bit broken.  Somef  othe spacing is as as well on other pages and the fonts appear to be a but up and down.

The h4 entry is meant to be non-repeating but it appears to be ignoring it:

h4
{
   margin: 0px;
   padding: 0px;
   border: 0px;
   margin-top: 20px;
   margin-bottom: 10px;
   font-size: 18px;
}
h4.entry
{
   padding-left: 15;
    background: url('images/h4_icon.png');
    background-repeat: no-repeat;

}

These all look very much like issues that probably were absolutely fine on older versions of the application 8 years ago but Windows and/or Qt have moved on and things have gone a bit squiffy.

Fun fun fun :-)
47
Other Open Source Projects / Re: Standalone Tank IR
« Last post by Rongyos on January 03, 2024, 04:21:07 PM »
Hi!

@Luke: I didn't find the "myreceiverobject.getPinNum" object where the receiver pin number has to be assigned to D2 pin of Nano.
Can you help me where I can get it? My receiver is not working right now.

An other question. Do you know where can I get constant 5V from the Taigen V3 MFU? It seems the CN2 is only providing around 1.8V

Mod.: Also when I provide 5V to my servo its little bit moving (the recoil look fine to me) when it shouldn't do that, like some kind of whitenoise

Thanks and regards!
Rongyos

Problem again: no servo recoil (every connection is good)

Problem again2: phantom cannon shot after switching on (do you remember this problem also appeared on TCB):

15:10:15.520 -> ---------------------------------------------
15:10:15.520 -> BATTLE INFO
15:10:15.520 -> ---------------------------------------------
15:10:15.564 -> Is Repair Tank?   No
15:10:15.564 -> Fire Protocol:    Tamiya
15:10:15.564 -> Hit Protocol 2:   Heng Long
15:10:15.564 -> Repaired by:      Clark Repair
15:10:15.564 -> Send MG IR Code:  No
15:10:15.564 -> Accept MG Damage: No
15:10:15.564 -> Damage Profile:   Tamiya Spec
15:10:15.564 -> Weight Class:     Medium
15:10:15.564 -> (6 cannon hits, 5.0 sec reload, 12.0 sec recovery)
15:10:15.564 ->
15:10:15.564 ->
15:10:15.564 ->
15:10:21.556 -> Fire Cannon
48
TCB Dev / Re: High DPI Issue
« Last post by FuzzyJack on January 02, 2024, 02:55:20 PM »
Oh and I would be happy to recommend changes on a pull request from the fork if helpful.

One of the main differences in the later version is the settings in the user file but of course that contains user specific environment variables/paths and aren’t great for inclusion in the source control as it isn’t transferable between different environments.  Might have a think about that too.   

Not a Qt user before so it’s an interesting journey so far.   ;)
49
TCB Dev / Re: High DPI Issue
« Last post by FuzzyJack on January 02, 2024, 02:48:53 PM »
I did see a comment about the Qt assistant and I think I did get an error about it myself when I tried something.

Happy to have a nosey when I get a mo.   I am primarily a Mac user myself normally but have this Windows machine for various reasons so I can try things on both.  Obviously there are already known issues with a Mac because it uses WinSparkle for the updates rather than sparkle and the code isn’t currently set up to work differently depending on the O/S.

There are a couple of compilation warnings already popping up on the Mac when trying to build and there was an issue running Qt at all on Mac OS X 14 Sonoma but there was a known fix for that.

I’m looking at using the software to run an Arduino with an external motor controller (actually a Raspberry Pi Hat version so should be useable from Arduino or Pi with Judicious use of headers/connectors and a bit of PCB).   The fun bit is getting the extra external components on a PCB with a suitable power supply rail to allow the current without being supplied by the Arduino or the Pi or too much wiring.

I would love to build a board specifically or the Heclo hat but I’m starting with a few separate components at the moment just to get my head round it a bit.   The only downside of the Heclo board I can see at the moment is the use of the jst/xh connectors for some of the lighting while the Henglong 7.0 uses DuPont connectors for those.  It would be really nice to have a straight swap for the Henglong boards without extra converters or connectors but I get that the TCB is designed to be more than just a replacement for one specific solution!
50
TCB Dev / Re: High DPI Issue
« Last post by LukeZ on January 02, 2024, 11:50:10 AM »
Hi Chris,

Congrats on the most epic first post of all time! Guess you decided to jump straight into the deep end.

Back in the day I actually had complied in 5.6 with High DPI as a test, but since I didn't have a display with resolution greater than 1080P, it wasn't a very useful test. From what you've shown, the High DPI setting does seem to work well.

What this test back then did show me however were a few challenges that would come with upgrading to 5.6. The biggest downside was that QT Assistant (the program that renders all the built-in help files), was no longer supported, and at the time there wasn't a clear replacement. You can see a note to this effect in your first screen shot. It seemed a shame to lose the help, and most people were probably not using high resolution displays (well, that would have been more true in the past than today), so I stuck with 5.4. There were some other annoying bugs with 5.6, however I have heard they were fixed in later versions which did not exist back then.

Obviously if we're up to 5.15 now (not to mention 6.x), then a lot has changed in the intervening years, and maybe it is possible to get OP Config fully functional with a newer version. Having the high resolution issue resolved is a big advantage, but thorough testing needs to be done to make sure all the other components work.

If you want to keep experimenting please keep me posted on your progress and I'll be happy to help as I can!


Luke
Pages: 1 2 3 4 [5] 6 7 8 ... 10
bomber-explosion