Merge branch 'master' of github.com:r0ket/r0ket

This commit is contained in:
Stefan `Sec` Zehl 2011-08-03 23:16:41 +02:00
commit aeec12c3eb
2 changed files with 4 additions and 4 deletions

View File

@ -94,7 +94,7 @@ void tick_flame(void) { // every 10ms
}
if (flameMode == FLAME_UP) {
if (flameI2Cpwm + flameSpeedUp > flameI2Cpwm ) {
if (0xFF - flameI2Cpwm >= flameSpeedUp ) {
flameI2Cpwm += flameSpeedUp;
} else {
flameI2Cpwm = 0xFF;
@ -113,7 +113,7 @@ void tick_flame(void) { // every 10ms
}
if (flameMode == FLAME_DOWN) {
if (flameI2Cpwm - flameSpeedDown < flameI2Cpwm ) {
if (flameSpeedDown <= flameI2Cpwm) {
flameI2Cpwm -= flameSpeedDown;
} else {
flameI2Cpwm = 0x00;

View File

@ -84,7 +84,7 @@ void tick_flame(void) { // every 10ms
}
if (flameMode == FLAME_UP) {
if (flameI2Cpwm + flameSpeedUp > flameI2Cpwm ) {
if (0xFF - flameI2Cpwm >= flameSpeedUp) {
flameI2Cpwm += flameSpeedUp;
} else {
flameI2Cpwm = 0xFF;
@ -103,7 +103,7 @@ void tick_flame(void) { // every 10ms
}
if (flameMode == FLAME_DOWN) {
if (flameI2Cpwm - flameSpeedDown < flameI2Cpwm ) {
if (flameSpeedDown <= flameI2Cpwm) {
flameI2Cpwm -= flameSpeedDown;
} else {
flameI2Cpwm = 0x00;