tracing backlight problem and fixing a typo in a function definition
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#include "scode.h"
|
||||
#include "log.h"
|
||||
#include "gpio.h"
|
||||
#include "ep_upiwin.h"
|
||||
#include "ep_init.h"
|
||||
@@ -23,6 +24,7 @@ PyObject *Epython_set_backlight(PyObject *self, PyObject *args)
|
||||
if (!PyArg_ParseTuple(args, "p", &new_state))
|
||||
return NULL;
|
||||
pstate = (PUPIWIN_STATE)PyModule_GetState(UPIWIN_module);
|
||||
Log(LDEBUG, "set_backlight: old=%d, new=%d (level=%u)", pstate->backlight_on, new_state, pstate->backlight_level);
|
||||
if (new_state && !(pstate->backlight_on))
|
||||
Gpio_set_backlight(pstate->backlight_level);
|
||||
else if (!new_state && pstate->backlight_on)
|
||||
|
||||
Reference in New Issue
Block a user