nissy-classic

Stable branch of nissy
git clone https://git.tronto.net/nissy-classic
Download | Log | Files | Refs | README | LICENSE

commit d3852e44b7d16955aec581d73e641fe495cb1420
parent 7ef86345ab968b0bcee70a6402c7f84691e4b683
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Wed,  3 May 2023 09:35:53 +0200

Added corners-dr step

Diffstat:
Msrc/pruning.c | 8++++++++
Msrc/pruning.h | 1+
Msrc/steps.c | 91+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 100 insertions(+), 0 deletions(-)

diff --git a/src/pruning.c b/src/pruning.c @@ -73,6 +73,13 @@ pd_htr_drud = { }; PruneData +pd_cp_drud = { + .filename = "pt_cp_drud", + .coord = &coord_cp, + .moveset = &moveset_drud, +}; + +PruneData pd_htrfin_htr = { .filename = "pt_htrfin_htr", .coord = &coord_htrfin, @@ -99,6 +106,7 @@ PruneData * all_pd[] = { &pd_drud_eofb, &pd_drudfin_noE_sym16_drud, &pd_htr_drud, + &pd_cp_drud, &pd_htrfin_htr, &pd_nxopt31_HTM, NULL diff --git a/src/pruning.h b/src/pruning.h @@ -11,6 +11,7 @@ extern PruneData pd_drud_sym16_HTM; extern PruneData pd_drud_eofb; extern PruneData pd_drudfin_noE_sym16_drud; extern PruneData pd_htr_drud; +extern PruneData pd_cp_drud; extern PruneData pd_htrfin_htr; extern PruneData pd_nxopt31_HTM; diff --git a/src/steps.c b/src/steps.c @@ -26,6 +26,7 @@ static int estimate_drud_eofb(DfsArg *arg); static int estimate_dr_eofb(DfsArg *arg); static int estimate_drudfin_drud(DfsArg *arg); static int estimate_htr_drud(DfsArg *arg); +static int estimate_cp_drud(DfsArg *arg); static int estimate_htrfin_htr(DfsArg *arg); static int estimate_nxopt31_HTM(DfsArg *arg); static int estimate_light_HTM(DfsArg *arg); @@ -48,6 +49,8 @@ static char check_eo_msg[100] = "EO must be solved on given axis"; static char check_dr_msg[100] = "DR must be solved on given axis"; static char check_htr_msg[100] = "HTR must be solved"; static char check_drany_msg[100] = "DR must be solved on at least one axis"; +static char check_co_msg[100] = "CO must be solved on the given axis"; +static char check_coany_msg[100] = "CO must be solved on at least one axis"; /* Steps *********************************************************************/ @@ -886,6 +889,83 @@ htr_drfb = { .ntables = 1, }; +/* Corners from DR */ +Step +corners_dr_any = { + .shortname = "corners-dr", + .name = "Solve corners from DR", + + .final = false, + .is_done = check_corners_HTM, + .estimate = estimate_cp_drud, + .ready = check_coud_HTM, + .ready_msg = check_coany_msg, + .is_valid = always_valid, + .moveset = &moveset_drud, + + .detect = detect_pretrans_drud, + + .tables = {&pd_cp_drud}, + .ntables = 1, +}; + +Step +corners_drud = { + .shortname = "corners-drud", + .name = "Solve corners from DR on U/D", + + .final = false, + .is_done = check_corners_HTM, + .estimate = estimate_cp_drud, + .ready = check_coud_HTM, + .ready_msg = check_co_msg, + .is_valid = always_valid, + .moveset = &moveset_drud, + + .pre_trans = uf, + + .tables = {&pd_cp_drud}, + .ntables = 1, +}; + +Step +corners_drrl = { + .shortname = "corners-drrl", + .name = "Solve corners from DR on R/L", + + .final = false, + .is_done = check_corners_HTM, + .estimate = estimate_cp_drud, + .ready = check_coud_HTM, + .ready_msg = check_co_msg, + .is_valid = always_valid, + .moveset = &moveset_drud, + + .pre_trans = rf, + + .tables = {&pd_cp_drud}, + .ntables = 1, +}; + +Step +corners_drfb = { + .shortname = "corners-drfb", + .name = "Solve corners from DR on F/B", + + .final = false, + .is_done = check_corners_HTM, + .estimate = estimate_cp_drud, + .ready = check_coud_HTM, + .ready_msg = check_co_msg, + .is_valid = always_valid, + .moveset = &moveset_drud, + + .pre_trans = fd, + + .tables = {&pd_cp_drud}, + .ntables = 1, +}; + /* HTR finish */ Step htrfin_htr = { @@ -956,6 +1036,11 @@ Step *steps[] = { &htr_drrl, &htr_drfb, + &corners_dr_any, + &corners_drud, + &corners_drrl, + &corners_drfb, + &htrfin_htr, &cornershtr_HTM, @@ -1168,6 +1253,12 @@ estimate_htr_drud(DfsArg *arg) } static int +estimate_cp_drud(DfsArg *arg) +{ + return ptableval(&pd_cp_drud, arg->cube); +} + +static int estimate_htrfin_htr(DfsArg *arg) { return ptableval(&pd_htrfin_htr, arg->cube);