Skip to content

Commit

Permalink
Merge pull request #109 from paxo-phone/gabriel_dev
Browse files Browse the repository at this point in the history
fix windows compilation
  • Loading branch information
paxo-rch authored Sep 11, 2024
2 parents 43adb5f + 0b31f22 commit ff66ce5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/gsm/src/gsm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ namespace GSM
StandbyMode::triggerPower();
download();

uint i = data.find("+HTTPACTION: ");
uint32_t i = data.find("+HTTPACTION: ");
if(i != std::string::npos)
{
if(data.find("\r\n", i) != std::string::npos)
Expand Down Expand Up @@ -569,8 +569,8 @@ namespace GSM
graphics::Surface loading(320, 5); // affiche le chargement parce que l'app en cours est figée
loading.fillRect(0, 0, loading.getWidth(), loading.getHeight(), 0xFFFF);

for(uint i = 0; i < size;) { // pour tous les caractères de données brutes annoncés
for (uint r = 0; r < numberOfBlocks +1 && i < size; r++) // pour tous les blocs envoyés en une fois
for(uint32_t i = 0; i < size;) { // pour tous les caractères de données brutes annoncés
for (uint32_t r = 0; r < numberOfBlocks +1 && i < size; r++) // pour tous les blocs envoyés en une fois
{
while ((gsm.available() && timer + timeout_block > millis())?(gsm.read() != ':'):(true)); // wait for the garbage data to be ignored
while ((gsm.available() && timer + timeout_block > millis())?(gsm.read() != '\n'):(true));
Expand All @@ -585,7 +585,7 @@ namespace GSM

if(jpg == 0) // no jpeg for the moment
{
for (uint j = 0; j < nextBlockSize; j++) // parse the block
for (uint32_t j = 0; j < nextBlockSize; j++) // parse the block
{
char c = gsm.read(); // read the next char

Expand Down Expand Up @@ -636,7 +636,7 @@ namespace GSM
bufferIndex += nextBlockSize;
} else // jpg == 2
{
for (uint j = 0; j < nextBlockSize; j++) // ignore the rest of the data
for (uint32_t j = 0; j < nextBlockSize; j++) // ignore the rest of the data
gsm.read();
}

Expand All @@ -647,7 +647,7 @@ namespace GSM

// loading bar in the terminal
std::cout << "[";
for (uint j = 0; j < 20; j++)
for (uint32_t j = 0; j < 20; j++)
{
if(i < j*size/20)
std::cout << " ";
Expand Down

0 comments on commit ff66ce5

Please sign in to comment.