Ensure new/changed PG are reset when firmware is upgraded. #2395

Closed
hydra opened this Issue Sep 11, 2016 · 9 comments

Projects

None yet

3 participants

@hydra
Contributor
hydra commented Sep 11, 2016

Currently new PG's are uninitialised when the firmware is upgraded. The reset templates/functions should be used.

@hydra hydra added the critical label Sep 11, 2016
@hydra hydra added this to the 1.14.0 milestone Sep 11, 2016
@hydra
Contributor
hydra commented Sep 11, 2016

@martinbudden do you have time for this?

@hydra hydra referenced this issue Sep 12, 2016
Closed

Prepare for 1.14.0 release #2211

5 of 5 tasks complete
@martinbudden
Contributor

@hydra , I'll have a look at this in the next day or two. @ledvinap your eyes on this would also be good.

@martinbudden
Contributor
@ledvinap
Contributor

@martinbudden: only template array initialization is not implemented, init function must be used instead.

Problem is that reset is called only explicitly, but it should be called on new PGs after upgrade

@hydra
Contributor
hydra commented Sep 12, 2016

@martinbudden What caused me to notice this was the addition of the new voltageMeterConfig and currentMeterConfig items in #2396. They were arrays. I think also the new pilotConfig (in common/pilot.h) also showed the issue. It's quite easy to test, just erase a flash, put latest stable version on, boot it. then upgrade to latest master and you'll see the issue if you put breakpoints on any of the new PG reset functions / templates added since 1.13.0

@ledvinap is correct, the lack of template array initialization isn't the issue here.

@hydra
Contributor
hydra commented Sep 12, 2016

We also need to verify that PG's with a new version are reset if there is a version mismatch. We can open a new issue for that or tackle that as part of this. e.g. batteryConfig in #2396 is now at version 1 (instead of version 0)

@hydra
Contributor
hydra commented Sep 12, 2016

@martinbudden hi. I'm working on configurator changes tonight. If you have time to look at this I would really appreciate it as I'm snowed under right now and need all the help I can get.

@martinbudden
Contributor

@hydra , I can't spend any time on it today, but I'll try and look at it tomorrow.

@hydra
Contributor
hydra commented Sep 15, 2016

Done via #2401

@hydra hydra closed this Sep 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment