16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 15:49:19 +02:00

reformat: parameters can be made const

This commit is contained in:
jerrrrycho
2026-07-04 07:08:14 +02:00
parent 6fd1d6715b
commit 220689a5e3
121 changed files with 1380 additions and 1352 deletions

View File

@@ -201,7 +201,7 @@ bool TPoKeys55::Connect()
return false;
}
//---------------------------------------------------------------------------
bool TPoKeys55::Write(unsigned char c, unsigned char b3, unsigned char b4, unsigned char b5)
bool TPoKeys55::Write(const unsigned char c, const unsigned char b3, const unsigned char b4, const unsigned char b5)
{
DWORD BytesWritten = 0;
OutputBuffer[0] = 0; // The first byte is the "Report ID" and does not get transmitted over the
@@ -287,14 +287,14 @@ std::string TPoKeys55::Version()
return "";
};
bool TPoKeys55::PWM(int x, float y)
bool TPoKeys55::PWM(const int x, const float y)
{ // ustawienie wskazanego PWM (@12Mhz: 12000=1ms=1000Hz)
// iPWM[7]=1024; //1024==85333.3333333333ns=11718.75Hz
iPWM[x] = int(0.5f + 0x0FFF * y) & 0x0FFF; // 0x0FFF=4095
return true;
}
bool TPoKeys55::Update(bool pause)
bool TPoKeys55::Update(const bool pause)
{ // funkcja powinna być wywoływana regularnie, np. raz w każdej ramce ekranowej
if (pause)
{ // specjalna procedura, jeśli utracone połączenie spowodowało pauzę