mirror of
https://git.disroot.org/pranav/pybatmesh.git
synced 2024-11-30 10:42:15 +05:30
added more logging info
This commit is contained in:
parent
e4a7fa5d3f
commit
87c5d48144
@ -36,4 +36,4 @@ See README.md for documentation.
|
|||||||
#
|
#
|
||||||
# In case you forgot to change the version, skip the number
|
# In case you forgot to change the version, skip the number
|
||||||
# and put the next number in the next commit.
|
# and put the next number in the next commit.
|
||||||
__version__ = "0.3.0a1.dev3"
|
__version__ = "0.3.0a1.dev4"
|
||||||
|
@ -270,11 +270,15 @@ class Device:
|
|||||||
# Stop ap if already started
|
# Stop ap if already started
|
||||||
self.stop_ap()
|
self.stop_ap()
|
||||||
|
|
||||||
|
logger.debug(
|
||||||
|
"Starting ap on %s with ssid %s and password %s", self.name, ssid, passwd
|
||||||
|
)
|
||||||
self._proxy.Start(ssid, passwd)
|
self._proxy.Start(ssid, passwd)
|
||||||
|
|
||||||
def stop_ap(self):
|
def stop_ap(self):
|
||||||
"""stop ap if an ap is started"""
|
"""stop ap if an ap is started"""
|
||||||
if self.is_ap_started():
|
if self.is_ap_started():
|
||||||
|
logger.debug("Stopping ap on %s", self.name)
|
||||||
self._proxy.Stop()
|
self._proxy.Stop()
|
||||||
self.reload()
|
self.reload()
|
||||||
|
|
||||||
@ -305,10 +309,12 @@ class Adapter:
|
|||||||
def power_on(self):
|
def power_on(self):
|
||||||
"""power on the adapter"""
|
"""power on the adapter"""
|
||||||
self._proxy.Powered = True
|
self._proxy.Powered = True
|
||||||
|
logger.debug("Powered on adapter %s", self.name)
|
||||||
|
|
||||||
def power_off(self):
|
def power_off(self):
|
||||||
"""power off the adapter"""
|
"""power off the adapter"""
|
||||||
self._proxy.Powered = False
|
self._proxy.Powered = False
|
||||||
|
logger.debug("Powered off adapter %s", self.name)
|
||||||
|
|
||||||
def supports_mode(self, mode: str) -> bool:
|
def supports_mode(self, mode: str) -> bool:
|
||||||
"""
|
"""
|
||||||
|
@ -116,6 +116,9 @@ def setup_devices(args):
|
|||||||
ap_adapter.reload()
|
ap_adapter.reload()
|
||||||
ap_device.start_ap(args.ap_ssid, args.ap_passwd)
|
ap_device.start_ap(args.ap_ssid, args.ap_passwd)
|
||||||
|
|
||||||
|
# naxalnet prints Bye if no errors occured
|
||||||
|
logger.info("Bye")
|
||||||
|
|
||||||
|
|
||||||
def print_wifi(args):
|
def print_wifi(args):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user