Skip to content

Commit 363cf86

Browse files
committed
Enable AutoStory for beta. Fix SleepSuppress display on no preventing sleep.
1 parent f3bb8ea commit 363cf86

File tree

4 files changed

+29
-9
lines changed

4 files changed

+29
-9
lines changed

SerialPrograms/Source/CommonFramework/Environment/SystemSleep_Windows.tpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ struct SystemSleepController::InternalController{
2727
]{
2828
EXECUTION_STATE flags = ES_CONTINUOUS;
2929
if (screen_on_requests > 0){
30-
flags |= ES_DISPLAY_REQUIRED;
30+
flags |= ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED;
3131
}
3232
if (no_sleep_requests > 0){
3333
flags |= ES_SYSTEM_REQUIRED | ES_AWAYMODE_REQUIRED;

SerialPrograms/Source/CommonFramework/Globals.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace PokemonAutomation{
2525
const bool IS_BETA_VERSION = true;
2626
const int PROGRAM_VERSION_MAJOR = 0;
2727
const int PROGRAM_VERSION_MINOR = 50;
28-
const int PROGRAM_VERSION_PATCH = 4;
28+
const int PROGRAM_VERSION_PATCH = 6;
2929

3030
const std::string PROGRAM_VERSION_BASE =
3131
"v" + std::to_string(PROGRAM_VERSION_MAJOR) +

SerialPrograms/Source/NintendoSwitch/DevPrograms/TestProgramSwitch.cpp

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,14 @@
120120
#include "PokemonSV/Inference/ItemPrinter/PokemonSV_ItemPrinterMaterialDetector.h"
121121
#include "PokemonSV/Inference/Overworld/PokemonSV_DirectionDetector.h"
122122
#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h"
123+
//#include "CommonFramework/Environment/SystemSleep.h"
123124

124125

125126

126127
#include <QPixmap>
127128
#include <QVideoFrame>
128129

129-
//#include <Windows.h>
130+
#include <Windows.h>
130131
#include <iostream>
131132
using std::cout;
132133
using std::endl;
@@ -267,7 +268,28 @@ void TestProgram::program(MultiSwitchProgramEnvironment& env, CancellableScope&
267268

268269
// PokemonLA::ButtonDetector detector(logger, PokemonLA::ButtonType::ButtonA,);
269270

270-
#if 1
271+
// while (true){
272+
// SystemSleepController::instance().push_screen_on();
273+
// scope.wait_for(std::chrono::seconds(10));
274+
// }
275+
276+
// SetThreadExecutionState(ES_CONTINUOUS | ES_DISPLAY_REQUIRED);
277+
278+
// VideoSnapshot image = feed.snapshot();
279+
ImageRGB32 image("screenshot-20241124-135028529403.png");
280+
281+
DateReader date_reader;
282+
date_reader.make_overlays(overlays);
283+
auto date = date_reader.read_date(logger, std::make_shared<ImageRGB32>(std::move(image)));
284+
cout << "year = " << (int)date.second.year << endl;
285+
cout << "month = " << (int)date.second.month << endl;
286+
cout << "day = " << (int)date.second.day << endl;
287+
cout << "hour = " << (int)date.second.hour << endl;
288+
cout << "min = " << (int)date.second.minute << endl;
289+
cout << "secs = " << (int)date.second.second << endl;
290+
291+
292+
#if 0
271293

272294
VideoSnapshot image = feed.snapshot();
273295
DirectionDetector detector;

SerialPrograms/Source/PokemonSV/PokemonSV_Panels.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,12 @@ std::vector<PanelEntry> PanelListFactory::make_panels() const{
142142
ret.emplace_back(make_single_switch_program<RideCloner101_Descriptor, RideCloner101>());
143143
ret.emplace_back(make_single_switch_program<CloneItems101_Descriptor, CloneItems101>());
144144

145-
if (PreloadSettings::instance().DEVELOPER_MODE
146-
// || IS_BETA_VERSION
147-
){
145+
if (PreloadSettings::instance().DEVELOPER_MODE || IS_BETA_VERSION){
148146
ret.emplace_back("---- Untested/Beta/WIP ----");
149-
ret.emplace_back("---- Story Automation ----");
150-
ret.emplace_back(make_single_switch_program<AutoStory_Descriptor, AutoStory>());
151147
}
152148
if (IS_BETA_VERSION){
149+
// ret.emplace_back("---- Story Automation ----");
150+
ret.emplace_back(make_single_switch_program<AutoStory_Descriptor, AutoStory>());
153151
}
154152
if (PreloadSettings::instance().DEVELOPER_MODE){
155153

0 commit comments

Comments
 (0)