aboutsummaryrefslogtreecommitdiff
path: root/src/steps.c
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2023-05-03 09:35:53 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2023-05-03 09:35:53 +0200
commitd3852e44b7d16955aec581d73e641fe495cb1420 (patch)
tree9b3feab4911843f39ef08529daa777d7d13fb69a /src/steps.c
parent7ef86345ab968b0bcee70a6402c7f84691e4b683 (diff)
downloadnissy-classic-d3852e44b7d16955aec581d73e641fe495cb1420.tar.gz
nissy-classic-d3852e44b7d16955aec581d73e641fe495cb1420.zip
Added corners-dr step
Diffstat (limited to 'src/steps.c')
-rw-r--r--src/steps.c91
1 files changed, 91 insertions, 0 deletions
diff --git a/src/steps.c b/src/steps.c
index 3189811..a380494 100644
--- a/src/steps.c
+++ b/src/steps.c
@@ -26,6 +26,7 @@ static int estimate_drud_eofb(DfsArg *arg);
26static int estimate_dr_eofb(DfsArg *arg); 26static int estimate_dr_eofb(DfsArg *arg);
27static int estimate_drudfin_drud(DfsArg *arg); 27static int estimate_drudfin_drud(DfsArg *arg);
28static int estimate_htr_drud(DfsArg *arg); 28static int estimate_htr_drud(DfsArg *arg);
29static int estimate_cp_drud(DfsArg *arg);
29static int estimate_htrfin_htr(DfsArg *arg); 30static int estimate_htrfin_htr(DfsArg *arg);
30static int estimate_nxopt31_HTM(DfsArg *arg); 31static int estimate_nxopt31_HTM(DfsArg *arg);
31static int estimate_light_HTM(DfsArg *arg); 32static int estimate_light_HTM(DfsArg *arg);
@@ -48,6 +49,8 @@ static char check_eo_msg[100] = "EO must be solved on given axis";
48static char check_dr_msg[100] = "DR must be solved on given axis"; 49static char check_dr_msg[100] = "DR must be solved on given axis";
49static char check_htr_msg[100] = "HTR must be solved"; 50static char check_htr_msg[100] = "HTR must be solved";
50static char check_drany_msg[100] = "DR must be solved on at least one axis"; 51static char check_drany_msg[100] = "DR must be solved on at least one axis";
52static char check_co_msg[100] = "CO must be solved on the given axis";
53static char check_coany_msg[100] = "CO must be solved on at least one axis";
51 54
52/* Steps *********************************************************************/ 55/* Steps *********************************************************************/
53 56
@@ -886,6 +889,83 @@ htr_drfb = {
886 .ntables = 1, 889 .ntables = 1,
887}; 890};
888 891
892/* Corners from DR */
893Step
894corners_dr_any = {
895 .shortname = "corners-dr",
896 .name = "Solve corners from DR",
897
898 .final = false,
899 .is_done = check_corners_HTM,
900 .estimate = estimate_cp_drud,
901 .ready = check_coud_HTM,
902 .ready_msg = check_coany_msg,
903 .is_valid = always_valid,
904 .moveset = &moveset_drud,
905
906 .detect = detect_pretrans_drud,
907
908 .tables = {&pd_cp_drud},
909 .ntables = 1,
910};
911
912Step
913corners_drud = {
914 .shortname = "corners-drud",
915 .name = "Solve corners from DR on U/D",
916
917 .final = false,
918 .is_done = check_corners_HTM,
919 .estimate = estimate_cp_drud,
920 .ready = check_coud_HTM,
921 .ready_msg = check_co_msg,
922 .is_valid = always_valid,
923 .moveset = &moveset_drud,
924
925 .pre_trans = uf,
926
927 .tables = {&pd_cp_drud},
928 .ntables = 1,
929};
930
931Step
932corners_drrl = {
933 .shortname = "corners-drrl",
934 .name = "Solve corners from DR on R/L",
935
936 .final = false,
937 .is_done = check_corners_HTM,
938 .estimate = estimate_cp_drud,
939 .ready = check_coud_HTM,
940 .ready_msg = check_co_msg,
941 .is_valid = always_valid,
942 .moveset = &moveset_drud,
943
944 .pre_trans = rf,
945
946 .tables = {&pd_cp_drud},
947 .ntables = 1,
948};
949
950Step
951corners_drfb = {
952 .shortname = "corners-drfb",
953 .name = "Solve corners from DR on F/B",
954
955 .final = false,
956 .is_done = check_corners_HTM,
957 .estimate = estimate_cp_drud,
958 .ready = check_coud_HTM,
959 .ready_msg = check_co_msg,
960 .is_valid = always_valid,
961 .moveset = &moveset_drud,
962
963 .pre_trans = fd,
964
965 .tables = {&pd_cp_drud},
966 .ntables = 1,
967};
968
889/* HTR finish */ 969/* HTR finish */
890Step 970Step
891htrfin_htr = { 971htrfin_htr = {
@@ -956,6 +1036,11 @@ Step *steps[] = {
956 &htr_drrl, 1036 &htr_drrl,
957 &htr_drfb, 1037 &htr_drfb,
958 1038
1039 &corners_dr_any,
1040 &corners_drud,
1041 &corners_drrl,
1042 &corners_drfb,
1043
959 &htrfin_htr, 1044 &htrfin_htr,
960 1045
961 &cornershtr_HTM, 1046 &cornershtr_HTM,
@@ -1168,6 +1253,12 @@ estimate_htr_drud(DfsArg *arg)
1168} 1253}
1169 1254
1170static int 1255static int
1256estimate_cp_drud(DfsArg *arg)
1257{
1258 return ptableval(&pd_cp_drud, arg->cube);
1259}
1260
1261static int
1171estimate_htrfin_htr(DfsArg *arg) 1262estimate_htrfin_htr(DfsArg *arg)
1172{ 1263{
1173 return ptableval(&pd_htrfin_htr, arg->cube); 1264 return ptableval(&pd_htrfin_htr, arg->cube);

Generated with cgit - Back to sebastiano.tronto.net