Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maqueen Avoiding Obstacles #4812

Closed
4CodeLife opened this issue Jul 15, 2022 · 11 comments
Closed

Maqueen Avoiding Obstacles #4812

4CodeLife opened this issue Jul 15, 2022 · 11 comments

Comments

@4CodeLife
Copy link

Hello GitHub I am trying to download code for the maqueen onto the Microbit and I continuously get the following message: The hex file is not available, please connect to the internet and try again. However, I am connected to the internet. I tried downloading a different project on the same Microbit. That code downloaded with no problem. Does anyone have any suggestions? Please
Here is the code link:
https://makecode.microbit.org/_a34Jt9EAU02i

@jwunderl
Copy link
Member

Log: https://makecode.com/compile/dd13b0493958372b7a1c8b36291a7c639b55cbff34ae481be2e9dbd503eff21f.log w/

/home/build/prj2/source/pointers.cpp:342:13: error: 'vector' does not name a type; did you mean 'error'?
     typedef vector<Action> vA;
             ^~~~~~
             error

but hasn't changed in a while so probably on us?
https://github.com/DFRobot/pxt-maqueen/blob/master/maqueenIR.cpp#L6

@abchatra abchatra added this to the Hotfix ongoing milestone Jul 15, 2022
@martinwork
Copy link
Contributor

It builds OK on live after updating the Maqueen extension.
The Maqueen extension in the shared project is 1.2.3. After updating, it's 1.7.0 and the IR category has a different name.

@riknoll
Copy link
Member

riknoll commented Jul 20, 2022

Thanks @martinwork! This is indeed an issue of the extension being outdated. @4CodeLife you can download the latest extension by switching to typescript and clicking the refresh button next to the extension in the file explorer on the left

Or, just open this project where I updated it for you:

https://makecode.microbit.org/_e6jdcAetk9qC

@riknoll riknoll closed this as completed Jul 20, 2022
@4CodeLife
Copy link
Author

@riknoll Thank you for your response. I am teacher and I will be using the Maqueen Robot this school year. I am hoping that my students will not ran into the same issue as I did this week when they try to download MaQueen code. What should I have my students do they ran into a downloading issue with the MaQueen?

@jwunderl
Copy link
Member

jwunderl commented Jul 20, 2022

Since there is a new tagged version, the students shouldn't run into this issue -- whenever you add the extension from the extensions view it grabs the latest release (1.7.0 currently). This issue would happen when someone has an old project that was created when that version of maqueen (1.2.3) was the latest version.

Could you say where you got that share link from -- was it an example you got from somewhere? It looks like it was likely made back in march 2020 looking at the version history of maqueen

@riknoll do you think we should add a version upgrade to targetconfig like https://github.com/microsoft/pxt-microbit/blob/master/targetconfig.json#L458 since the old version c++ doesn't work or should it be fine as is?

@riknoll
Copy link
Member

riknoll commented Jul 20, 2022

@jwunderl yeah, wouldn't hurt

@martinwork
Copy link
Contributor

martinwork commented Aug 25, 2022

@riknoll Can this be fixed, so the extension code compiles as in MakeCode v4? If not, how must extension code that uses <vector> be changed to work?

@riknoll
Copy link
Member

riknoll commented Aug 25, 2022

I think the easiest thing to do would just be avoid the vector class for now.

@mmoskal any idea why this cropped up? I would assume it's either because of the new yotta or some change in the microbit-dal

@mmoskal
Copy link
Member

mmoskal commented Aug 25, 2022

@martinwork the easiest hack is to put a space or some comment in front of typedef.

The offending line is https://github.com/microsoft/pxt/blob/master/pxtlib/cpp.ts#L677 - it copies typedefs from source files to pointers.cpp, so the prototypes can be parsed correctly. We could change that to not copy lines containing <.

I'm not sure how this ever worked, this code has been there for 6 years. It could be that something implicitly included <vector> in the past but I find that suspicious.

@martinwork
Copy link
Contributor

Thanks @mmoskal and @riknoll! A single space in front of typedef lets it work. The example I tested, that compiles in MakeCode V4, is in the approved list, called "ir-receiver". https://github.com/tinkertanker/pxt-ir-receiver.

@mczaddam
Copy link

Ce problème ne semble pas avoir été résolu car j'obtiens le même message Qulequ'un a t'il une solution ?
merci

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants