Skip to content

Commit

Permalink
Fix 2 cylinder compression wave frequency
Browse files Browse the repository at this point in the history
  • Loading branch information
noisymime committed May 28, 2024
1 parent 4331a58 commit ed23b0c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ardustim/ardustim/ardustim.ino
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,9 @@ uint16_t calculateCompressionModifier()
switch(config.compressionType)
{
case COMPRESSION_TYPE_2CYL_4STROKE:
modAngle = modAngle / 2;
modAngle = crankAngle / 2;
compressionModifier = pgm_read_byte(&sin_100_180[modAngle]);
break;
case COMPRESSION_TYPE_4CYL_4STROKE:
modAngle = (crankAngle % 180) ;
compressionModifier = pgm_read_byte(&sin_100_180[modAngle]);
Expand Down

0 comments on commit ed23b0c

Please sign in to comment.