Skip to content

Commit

Permalink
Fix a crash in Scope where the max input voltage was being incorrectl…
Browse files Browse the repository at this point in the history
…y treated as an integer (#388)
  • Loading branch information
chrisib authored Nov 11, 2024
1 parent a8ed4ef commit c164d4a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion software/contrib/scope.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import math
from time import sleep

from europi_script import EuroPiScript
Expand Down Expand Up @@ -74,7 +75,7 @@ def read_sample_rate():

@staticmethod
def read_max_disp_voltage():
return k2.read_position(MAX_INPUT_VOLTAGE) + 1
return k2.read_position(math.ceil(MAX_INPUT_VOLTAGE)) + 1

@staticmethod
def calc_y_pos(max_disp_voltage, a_voltage):
Expand Down

0 comments on commit c164d4a

Please sign in to comment.