Issue using new SystemSleepConfiguration in po-util?

Hi all, I’m trying to use the new Sleep system objects, but I’m getting such classics as

/xxxxxx/firmware/firmware/main.cpp: In function 'void loop()':
/xxxxxx/firmware/firmware/main.cpp:110:3: error: 'SystemSleepConfiguration' was not declared in this scope
   SystemSleepConfiguration sleepcfg;
   ^

and

/xxxxxx/firmware/firmware/main.cpp:233:26: error: 'NETWORK_INTERFACE_CELLULAR' was not declared in this scope
                 .network(NETWORK_INTERFACE_CELLULAR)  // snooze cell modem
                          ^

and

/xxxxxx/firmware/firmware/main.cpp:239:23: error: 'SystemSleepMode' has not been declared
         sleepcfg.mode(SystemSleepMode::STOP)          // keep GPIO alive

Prior to adding the new API calls, everything compiled fine.
I’m using #include <Particle.h> as usual. I’ve attempted to build clean as well.

My po-util v7.2.0 is up to date and pulling release/stable. I’m at a loss, but I thought I’d ask around the room before pulling the build system apart.

1 Like

po-util is a personal project of @nrobinson2000 so it’ll be best to tag him with this :wink:

2 Likes

With the many improvements made to particle-cli, Workbench, and the rest of the Particle toolchain made since I was actively maintaining po-util, I’m surprised that po-util is still relevant. I guess that many users still enjoy a local development experience that cannot be achieved with particle-cli yet.

I’ve been meaning to create a more minimalist solution similar to po-util that depends more on particle-cli and Workbench components for the heavy lifting but I suspect that an official solution is underway.

@HEng, In regards to your issue, I would suggest running po update again in order to get the latest changes from the device-os repository.

Also, could you try using the official project structure for your project, rather than the legacy po-util structure? This can be achieved by creating a new project in Workbench, or in the CLI with:

particle project create

To use a project with the official structure with po-util you must append the -beta suffix to the applicable po-util commands, like build-beta, clean-beta, flash-beta.

2 Likes

It's more the case that po-util has been reliable for years after running into roadblocks constantly with the alternate toolchains. Kudos and thanks! You've helped me ship multiple products to clients in the last couple of years.


At this point I am thinking about blowing away my dev VM after a number of strange things have happened while troubleshooting this. I ended up reinstalling po-util from the bash script (which seems to have worked) and po update has been run multiple times.

I tried using the new project structure and running po electron build-beta on it, which gave me the same compile errors.

I then tried compiling with particle electron build which just terminated with no output....

Obviously there's still some work left to do on my end (rebuild the dev VM), but that's the progress so far.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.