Fixed readvdd33 bug.
This commit is contained in:
parent
0f3ade36d8
commit
fc8fa2cc91
|
@ -24,17 +24,10 @@ static int adc_sample( lua_State* L )
|
||||||
static int adc_readvdd33( lua_State* L )
|
static int adc_readvdd33( lua_State* L )
|
||||||
{
|
{
|
||||||
uint32_t vdd33 = 0;
|
uint32_t vdd33 = 0;
|
||||||
if(STATION_MODE == wifi_get_opmode())
|
|
||||||
{
|
os_intr_lock();
|
||||||
// Bug fix
|
|
||||||
wifi_set_opmode( STATIONAP_MODE );
|
|
||||||
vdd33 = readvdd33();
|
vdd33 = readvdd33();
|
||||||
wifi_set_opmode( STATION_MODE );
|
os_intr_unlock();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
vdd33 = readvdd33();
|
|
||||||
}
|
|
||||||
|
|
||||||
lua_pushinteger(L, vdd33);
|
lua_pushinteger(L, vdd33);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in New Issue