Skip to content

Commit 6779e2a

Browse files
committed
Require new firmware versions with report delay fix.
1 parent 9dc3a05 commit 6779e2a

File tree

6 files changed

+10
-12
lines changed

6 files changed

+10
-12
lines changed

ClientSource/Connection/PABotBase.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ uint64_t PABotBase::try_issue_request(
634634
if (message.body.size() < sizeof(uint32_t)){
635635
throw InternalProgramError(&m_logger, PA_CURRENT_FUNCTION, "Message is too short.");
636636
}
637-
if (message.body.size() > MAX_MESSAGE_SIZE){
637+
if (message.body.size() > PABB_PROTOCOL_MAX_PACKET_SIZE){
638638
throw InternalProgramError(&m_logger, PA_CURRENT_FUNCTION, "Message is too long.");
639639
}
640640

@@ -714,7 +714,7 @@ uint64_t PABotBase::try_issue_command(
714714
if (message.body.size() < sizeof(uint32_t)){
715715
throw InternalProgramError(&m_logger, PA_CURRENT_FUNCTION, "Message is too short.");
716716
}
717-
if (message.body.size() > MAX_MESSAGE_SIZE){
717+
if (message.body.size() > PABB_PROTOCOL_MAX_PACKET_SIZE){
718718
throw InternalProgramError(&m_logger, PA_CURRENT_FUNCTION, "Message is too long.");
719719
}
720720

ClientSource/Connection/PABotBaseConnection.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void PABotBaseConnection::send_message(const BotBaseMessage& message, bool is_re
6767
m_sniffer->on_send(message, is_retransmit);
6868

6969
size_t total_bytes = PABB_PROTOCOL_OVERHEAD + message.body.size();
70-
if (total_bytes > MAX_MESSAGE_SIZE){
70+
if (total_bytes > PABB_PROTOCOL_MAX_PACKET_SIZE){
7171
throw InternalProgramError(&m_logger, PA_CURRENT_FUNCTION, "Message is too long.");
7272
}
7373

@@ -105,7 +105,7 @@ void PABotBaseConnection::on_recv(const void* data, size_t bytes){
105105
}
106106

107107
// Message is too long.
108-
if (length > MAX_MESSAGE_SIZE){
108+
if (length > PABB_PROTOCOL_MAX_PACKET_SIZE){
109109
char ascii = ~length;
110110
std::string text = ascii < 32
111111
? ", ascii = " + std::to_string(ascii)

ClientSource/Connection/PABotBaseConnection.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#include <memory>
1818
#include <deque>
19-
//#include "Common/SerialPABotBase/SerialPABotBase_Protocol.h"
19+
#include "Common/SerialPABotBase/SerialPABotBase_Protocol.h"
2020
#include "BotBase.h"
2121
#include "MessageSniffer.h"
2222
#include "StreamInterface.h"
@@ -27,17 +27,14 @@ namespace PokemonAutomation{
2727
// None the functions in this class are thread-safe. It is up to
2828
// the child class to wrap and make them thread-safe.
2929
class PABotBaseConnection : public StreamListener{
30-
public:
31-
static const size_t MAX_MESSAGE_SIZE = 64;
32-
3330
public:
3431
PABotBaseConnection(Logger& logger, std::unique_ptr<StreamConnection> connection);
3532
virtual ~PABotBaseConnection();
3633

3734
void set_sniffer(MessageSniffer* sniffer);
3835

3936
public:
40-
void send_zeros(uint8_t bytes = MAX_MESSAGE_SIZE);
37+
void send_zeros(uint8_t bytes = PABB_PROTOCOL_MAX_PACKET_SIZE);
4138
void send_message(const BotBaseMessage& message, bool is_retransmit);
4239

4340
protected:

Common/SerialPABotBase/SerialPABotBase_Protocol.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ extern "C" {
143143

144144
#define PABB_BAUD_RATE 115200
145145
#define PABB_PROTOCOL_OVERHEAD (2 + sizeof(uint32_t))
146+
#define PABB_PROTOCOL_MAX_PACKET_SIZE 64
146147

147148
// Must be a power-of-two.
148149
#define PABB_DEVICE_MINIMUM_QUEUE_SIZE 4

SerialPrograms/Source/CommonFramework/Globals.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace PokemonAutomation{
2626
const bool IS_BETA_VERSION = true;
2727
const int PROGRAM_VERSION_MAJOR = 0;
2828
const int PROGRAM_VERSION_MINOR = 54;
29-
const int PROGRAM_VERSION_PATCH = 20;
29+
const int PROGRAM_VERSION_PATCH = 21;
3030

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

SerialPrograms/Source/Controllers/SerialPABotBase/SerialPABotBase.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ const std::map<
111111
}},
112112
}},
113113
}},
114-
{2025061303, {
114+
{2025061304, {
115115
{PABB_PID_PABOTBASE_ESP32S3, {
116116
{ControllerType::NintendoSwitch_WiredProController, {
117117
ControllerFeature::TickPrecise,
@@ -121,7 +121,7 @@ const std::map<
121121
}},
122122
}},
123123
}},
124-
{2025061403, {
124+
{2025061404, {
125125
{PABB_PID_PABOTBASE_ArduinoUnoR3, {
126126
{ControllerType::NintendoSwitch_WiredProController, {
127127
ControllerFeature::TickPrecise,

0 commit comments

Comments
 (0)