From 74aa1867b521e66e05568da35117a6a476320ab2 Mon Sep 17 00:00:00 2001 From: t-moe Date: Wed, 3 Jun 2015 23:40:19 +0200 Subject: [PATCH] Made pixy_test screen working again. Had to disable pixy_service. Recalibrated initial touch values. --- common/app/screen_pixytest.c | 4 ++-- discovery/libs/Pixy/src/pixy.cpp | 5 ++++- discovery/src/ll_touch.c | 2 +- discovery/utils/gdb_usb_breakpoints.script | 25 ++++++++++++++++++++++ 4 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 discovery/utils/gdb_usb_breakpoints.script diff --git a/common/app/screen_pixytest.c b/common/app/screen_pixytest.c index 32fdcf4..05b5402 100644 --- a/common/app/screen_pixytest.c +++ b/common/app/screen_pixytest.c @@ -264,7 +264,7 @@ static void enter(void* screen) { n_led_powerlimit.max=40; n_led_powerlimit.min =0; n_led_powerlimit.callback=n_led_powerlimit_cb; - //gui_numupdown_add(&n_led_powerlimit); + gui_numupdown_add(&n_led_powerlimit); @@ -283,7 +283,7 @@ static void leave(void* screen) { gui_button_remove(&b_led_red); gui_button_remove(&b_led_green); gui_button_remove(&b_led_blue); - //gui_numupdown_remove(&n_led_powerlimit); + gui_numupdown_remove(&n_led_powerlimit); } diff --git a/discovery/libs/Pixy/src/pixy.cpp b/discovery/libs/Pixy/src/pixy.cpp index ac0f9a7..ce63787 100644 --- a/discovery/libs/Pixy/src/pixy.cpp +++ b/discovery/libs/Pixy/src/pixy.cpp @@ -112,7 +112,10 @@ extern "C" int pixy_service() { - return interpreter.service(); + //Service calls are commented at the moment because they cause problems with USB on the discovery. + //TODO: Fix problems. + return -1; + //return interpreter.service(); } int pixy_command(const char *name, ...) diff --git a/discovery/src/ll_touch.c b/discovery/src/ll_touch.c index 2f82f60..7d5d21a 100644 --- a/discovery/src/ll_touch.c +++ b/discovery/src/ll_touch.c @@ -103,7 +103,7 @@ void touch_test(uint16_t x, uint16_t y) bool ll_touch_init() { touch_set_value_convert_mode(true); //Tell the touch module that we need converted values and display calibration - touch_set_calibration_values(0x0231, 0x0C08, 0x0287, 0x0B56); //set calibration values (copied from memory using the debugger) + touch_set_calibration_values(526, 2922, 588, 2736); //set calibration values (copied from memory using the debugger) //We have a ADS7843 Touch controller diff --git a/discovery/utils/gdb_usb_breakpoints.script b/discovery/utils/gdb_usb_breakpoints.script new file mode 100644 index 0000000..6069a23 --- /dev/null +++ b/discovery/utils/gdb_usb_breakpoints.script @@ -0,0 +1,25 @@ +break usbh_msc_core.c:243 + commands + p state + bt + c + end +break usbh_msc_core.c:249 + commands + c + end +break usbh_msc_core.c:214 + commands + p state + bt + c + end +break usbh_msc_core.c:221 + commands + c + end +break newlib_stubs.c:153 +break newlib_stubs.c:158 + commands + c + end