Fixing type issues

This commit is contained in:
Rodrigo Alfonso
2025-01-22 23:05:03 -03:00
parent d567eb3fdd
commit e5ecf1affc
6 changed files with 9 additions and 9 deletions

View File

@@ -560,7 +560,7 @@ class LinkCableMultiboot {
/**
* @brief Returns the completion percentage.
*/
[[nodiscard]] u32 getPercentage() {
[[nodiscard]] u8 getPercentage() {
if (state == STOPPED || fixedData.size == 0)
return 0;

View File

@@ -40,7 +40,7 @@ class LinkGPIO {
using u32 = Link::u32;
using u16 = Link::u16;
using u8 = Link::u8;
using vu16 = Link::u16;
using vu16 = Link::vu16;
static constexpr int RCNT_GENERAL_PURPOSE = 1 << 15;
static constexpr int SIOCNT_GENERAL_PURPOSE = 0;

View File

@@ -124,8 +124,8 @@ class LinkWirelessMultiboot {
struct MultibootProgress {
State state = STOPPED;
u32 connectedClients = 0;
u32 percentage = 0;
u8 connectedClients = 0;
u8 percentage = 0;
volatile bool* ready = nullptr;
};
@@ -423,7 +423,7 @@ class LinkWirelessMultiboot {
LinkRawWireless::ReceiveDataResponse response;
LINK_WIRELESS_MULTIBOOT_TRY_SUB(sendAndExpectData(sendBuffer, response))
u32 newPercentage = multiTransfer.processResponse(response);
u8 newPercentage = multiTransfer.processResponse(response);
if (newPercentage != progress.percentage) {
progress.percentage = newPercentage;
_LWMLOG_("-> " + std::to_string(newPercentage));

View File

@@ -637,7 +637,7 @@ class LinkWirelessOpenSDK {
* @param response The received response from the adapter.
* @return The completion percentage (0~100).
*/
u32 processResponse(LinkRawWireless::ReceiveDataResponse response) {
u8 processResponse(LinkRawWireless::ReceiveDataResponse response) {
if (finished)
return 100;

View File

@@ -80,7 +80,7 @@ void C_LinkCableMultiboot_Async_getResult(
u8 C_LinkCableMultiboot_Async_playerCount(
C_LinkCableMultiboot_AsyncHandle handle);
u32 C_LinkCableMultiboot_Async_getPercentage(
u8 C_LinkCableMultiboot_Async_getPercentage(
C_LinkCableMultiboot_AsyncHandle handle);
bool C_LinkCableMultiboot_Async_isReady(

View File

@@ -36,8 +36,8 @@ typedef enum {
typedef struct {
C_LinkWirelessMultiboot_State state;
u32 connectedClients;
u32 percentage;
u8 connectedClients;
u8 percentage;
volatile bool* ready;
} C_LinkWirelessMultiboot_Progress;