Repository navigation
Change int casts to long cast statements
On the Mega 2560, doing an (int) cast can result in an overflow condition when the number being cast is larger than the machine allocation for integers. For SAMD processors, an (int) cast doesn't approach this limit because 32-bit processors default to a larger number of bytes to store integers. Therefore, to avoid a possible overflow condition when using the Mega 2560, the two code functions that used (int) have been updated to use (long) instead. This will avoid that problem.