From 7dc95a0103af08c95c9093b6efa6c77af77a2538 Mon Sep 17 00:00:00 2001 From: aaaaaa123456789 Date: Sun, 13 Sep 2020 04:22:50 -0300 Subject: Undo PokeCodec's PRs This commit undoes most of PokeCodec's PRs after the debate in chat. Some harmless or completely superseded PRs have been left alone, as there is not much benefit in attempting to undo them. Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136, #1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179, #1180, #1181, #1182 and #1183. --- src/AgbRfu_LinkManager.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/AgbRfu_LinkManager.c') diff --git a/src/AgbRfu_LinkManager.c b/src/AgbRfu_LinkManager.c index 42cc9aea3..e4127ee09 100644 --- a/src/AgbRfu_LinkManager.c +++ b/src/AgbRfu_LinkManager.c @@ -352,7 +352,7 @@ static bool8 rfu_LMAN_linkWatcher(u16 REQ_commandID) { for (i = 0; i < RFU_CHILD_MAX; i++) { - if (bm_linkLossSlot & (1 << i)) + if ((bm_linkLossSlot >> i) & 1) { lman.linkRecoveryTimer.active |= (1 << i); lman.linkRecoveryTimer.count[i] = lman.linkRecoveryTimer.count_max; @@ -396,7 +396,7 @@ static bool8 rfu_LMAN_linkWatcher(u16 REQ_commandID) bm_disconnectSlot = 0; for (i = 0; i < RFU_CHILD_MAX; i++) { - if ((lman.linkRecoveryTimer.active) & (1 << i) && lman.linkRecoveryTimer.count[i] && --lman.linkRecoveryTimer.count[i] == 0) + if ((lman.linkRecoveryTimer.active >> i) & 1 && lman.linkRecoveryTimer.count[i] && --lman.linkRecoveryTimer.count[i] == 0) { lman.linkRecoveryTimer.active &= ~(1 << i); bm_disconnectSlot |= (1 << i); @@ -918,7 +918,7 @@ static void rfu_LMAN_REQ_callback(u16 reqCommandId, u16 reqResult) { lman.reserveDisconnectSlot_flag = 0; lman.acceptCount = 0; - lman.acceptSlot_flag = 0; + lman.acceptSlot_flag = 0;; lman.parent_child = MODE_NEUTRAL; rfu_LMAN_managerChangeAgbClockMaster(); if (reqCommandId == ID_STOP_MODE_REQ) -- cgit v1.2.3 From 7d5fce9a72de91b20d3908b5c6dbfac18b6524a4 Mon Sep 17 00:00:00 2001 From: Kurausukun Date: Mon, 19 Oct 2020 05:58:51 -0400 Subject: re-remove extra semicolons (from #1104) --- src/AgbRfu_LinkManager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/AgbRfu_LinkManager.c') diff --git a/src/AgbRfu_LinkManager.c b/src/AgbRfu_LinkManager.c index e4127ee09..f6ebcc726 100644 --- a/src/AgbRfu_LinkManager.c +++ b/src/AgbRfu_LinkManager.c @@ -918,7 +918,7 @@ static void rfu_LMAN_REQ_callback(u16 reqCommandId, u16 reqResult) { lman.reserveDisconnectSlot_flag = 0; lman.acceptCount = 0; - lman.acceptSlot_flag = 0;; + lman.acceptSlot_flag = 0; lman.parent_child = MODE_NEUTRAL; rfu_LMAN_managerChangeAgbClockMaster(); if (reqCommandId == ID_STOP_MODE_REQ) -- cgit v1.2.3