Skip to content

Trigger shutdown via ups #9

@dmcke5

Description

@dmcke5

Hi, thanks for the fantastic work so far!

I'm currently testing out the library to see if it can do everything I need for an upcoming project but so far I've been unable to trigger a shutdown so I was hoping for some advice on what I might be doing wrong?

I'm currently testing in windows and the battery percentage, time remaining etc is all working nicely. I have been able to trigger a shutdown by artificially setting the battery percentage below the shutdown threshold but that is relying on the settings being correct in the OS so I would rather use the inbuilt method if possible.

I've tried setting iDelayBe4ShutDown to something greater than 0. This appears to trigger the program to set the SHUTDOWNREQ and SHUTDOWNIMNT bits but then nothing happens after that. I've also tried setting the charging and AC present status to false incase that is preventing the shutdown from working so I'm not sure what else I could be missing.

The PC I'm testing on is a windows 11 desktop, so there are no other batteries present to confuse it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions