I’m trying an offline build on my Windows 10 machine. Using hFramework 1.5.9
I get the following error
class “hFramework::hSystem” has no member “getRefTime”
I’m using the following code (getSupplyVoltage does work):
using namespace hFramework;
printf(“test 111 %d\r\n”, (int) sys.getRefTime());
printf(“test 111 %d\r\n”, (int) sys.getSupplyVoltage());
I checked your code and no errors showed up. Have you changed anything in hFramework library?
I suggest you to try steps form this thread or reinstall Husarion Extension.
Let me know if it worked.
No changes to the framework library at all, I’m following the directions here:
Same behavior with a brand new Husarion project. Here is a short video that demonstrates the issue:
It appears that I may have an older Husarion framework being referenced, not sure how, I just started developing with Husarion. Intellisense is working and finds the framework, just not this method or other identifiers
Update - I should add that the project does compile without error and builds the elf, bin and hex files. If I purposely put in a syntax error like getRefTime2, then it doesn’t build as expected. So it appears that the error is limited to the editor only.
On your video I can see an error, but you said that:
project does compile without error and builds the elf, bin and hex files
I’m little a bit confused now. Can you show me the video with building and flashing your program to CORE2?
One more question, did you try to reinstall Husarion VSCode Extension like a mention in previous post?
Yes, it is quite confusing. Errors show in the Editor, yet the binaries still build. Here is another video that shows more information. One note, EACH TIME I start Code, it says the Include files are missing, even if I included them previously per the light bulb popup and saved all files. However, as you can see, the binaries are still built. Each time I start Code, the behavior is different. Also, in the second video, you can see that Code is hung for about a minute. Very odd. I tried reinstalling the extension too, same behavior. Can you show a screenshot of your Code running on Windows 10, with the telepresence robot project loaded?
UPDATE - I noticed that every time I load the project, cmake overwrites c_cpp_properties.json so I lose all the include file references set in the previous session. This is the startup log:
[Running C:\Users\Jeff.vscode\HusarionTools\bin\cmake . -DHFRAMEWORK_PATH=C:\Users\Jeff.vscode\extensions\husarion.husarion-1.5.9/sdk]
– Configuring done
– Generating done
– Build files have been written to: C:/Users/Jeff/Documents/GitHub/self-balancing-telepresence-robot
Any updates on this? It looks like the editor design-time environment is not properly handling the includes
at the beginning - thank you for a very detailed description of this issue. We have also observed in our office that the includes are not properly noticed by VSCode, but all the projects are compiled without error. This problem was not observed in the earlier versions (of VSCode or Husarion extension).
We will investigate this behavior and I think that the next version of extension will be released soon and will work fine I hope that improper handling the includes is the only problem for now and your projects work fine. Sorry for inconvenience.
Good to hear! Yes, it is not a showstopper for me since it still builds the app OK. I was just wondering if I was doing something wrong or had something misconfigured. FYI, I’m using the Core2 to stabilize the landing of the first stage of a prototype rocket, just like Elon! Except I’m using jet turbines, video here Update on Turbine Drone - YouTube
The errors were generated by VSC plugin for code inspection. Now include paths and hFramework are improved to comply with checker rules.
Make sure you have newest version of our plugin (1.5.14) and you will be able to build your project without any errors or warnings.
Got it! I will check it out, thanks for your attention on this.
This is still not working. I just got a brand new computer with Windows 10 and VS-Code 1.36.1, and installed the latest Husarion extensions. Same as before, it builds to the device. But as soon as I open main.cpp in the VS-Code editor, it complains it can’t find the include for hFramework.h and stddef.h with the default project that is created. It’s using Husarion 1.5.28 and a default install on a brand new computer, just after pressing Ctrl-Shift-P, type “create husarion project" and press enter in an empty folder. So it’s easy for you to reproduce, please advise.