summaryrefslogtreecommitdiff
path: root/shared-bindings/touchio/TouchIn.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared-bindings/touchio/TouchIn.c')
-rw-r--r--shared-bindings/touchio/TouchIn.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/shared-bindings/touchio/TouchIn.c b/shared-bindings/touchio/TouchIn.c
index 710260faf..326b0212e 100644
--- a/shared-bindings/touchio/TouchIn.c
+++ b/shared-bindings/touchio/TouchIn.c
@@ -36,6 +36,7 @@
#include "shared-bindings/microcontroller/Pin.h"
#include "shared-bindings/touchio/TouchIn.h"
#include "shared-bindings/util.h"
+#include "supervisor/shared/translate.h"
//| .. currentmodule:: touchio
//|
@@ -169,7 +170,7 @@ STATIC mp_obj_t touchio_touchin_obj_set_threshold(mp_obj_t self_in, mp_obj_t thr
uint32_t new_threshold = mp_obj_get_int(threshold_obj);
if (new_threshold < 0 || new_threshold > UINT16_MAX) {
// I would use MP_STRINGIFY(UINT16_MAX), but that prints "0xffff" instead of 65536.
- mp_raise_ValueError("threshold must be in the range 0-65536");
+ mp_raise_ValueError(translate("threshold must be in the range 0-65536"));
}
common_hal_touchio_touchin_set_threshold(self, new_threshold);
return mp_const_none;