Skip to content

Commit

Permalink
Merge pull request #480 from ChristianTremblay/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
ChristianTremblay authored Sep 20, 2024
2 parents e8d78d8 + 8b4bc79 commit c9a3145
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
8 changes: 4 additions & 4 deletions BAC0/core/functions/Discover.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ async def _discover(
# Try to find on which network we are
_this_network = await self.what_is_network_number()
if _this_network:
_networks.append(_this_network)
_networks.add(_this_network)
# Try to find local routers...
_other_networks = await self.whois_router_to_network()
if _other_networks == []:
_other_networks = await self.whois_router_to_network(global_broadcast=True)
for each in _other_networks:
network_adapter, _iamrtn = each
_networks.extend(_iamrtn.iartnNetworkList)
_networks.update(_iamrtn.iartnNetworkList)
for net in _networks:
_this_application._learnedNetworks.add(net)
self.log(f"Found those networks : {self.known_network_numbers}", level="info")
Expand All @@ -111,12 +111,12 @@ async def _discover(
# we'll make multiple whois...
for network in networks:
if network < 65535:
_networks.append(network)
_networks.add(network)
elif networks == "known":
_networks = self.known_network_numbers.copy()
else:
if isinstance(networks, int) and networks < 65535:
_networks.append(networks)
_networks.add(networks)

if _networks and not global_broadcast:
for each_network in _networks:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# BAC0 ![Build status](https://github.com/ChristianTremblay/BAC0/workflows/Build%20&%20Test/badge.svg?branch=main) ![Coverage](https://coveralls.io/repos/github/ChristianTremblay/BAC0/badge.svg?branch=main) ![Documentation](https://readthedocs.org/projects/bac0/badge/?version=latest)
# BAC0 [![Build & Test](https://github.com/ChristianTremblay/BAC0/actions/workflows/test.yml/badge.svg)](https://github.com/ChristianTremblay/BAC0/actions/workflows/test.yml) ![Coverage](https://coveralls.io/repos/github/ChristianTremblay/BAC0/badge.svg?branch=main) [![Documentation Status](https://readthedocs.org/projects/bac0/badge/?version=stable)](https://bac0.readthedocs.io/en/stable/?badge=stable)

[![Join the chat at https://gitter.im/ChristianTremblay/BAC0](https://badges.gitter.im/ChristianTremblay/BAC0.svg)](https://gitter.im/ChristianTremblay/BAC0?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Expand Down
7 changes: 4 additions & 3 deletions doc/README.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
BAC0
====

.. image:: https://github.com/ChristianTremblay/BAC0/workflows/Build%20&%20Test/badge.svg?branch=master
.. image:: https://github.com/ChristianTremblay/BAC0/workflows/Build%20&%20Test/badge.svg?branch=main
:alt: Build status
.. image:: https://coveralls.io/repos/github/ChristianTremblay/BAC0/badge.svg?branch=master
:alt: Coverage
.. image:: https://readthedocs.org/projects/bac0/badge/?version=latest
:alt: Documentation
.. image:: https://readthedocs.org/projects/bac0/badge/?version=stable
:target: https://bac0.readthedocs.io/en/stable/?badge=stable
:alt: Documentation Status

.. image:: https://badges.gitter.im/ChristianTremblay/BAC0.svg
:target: https://gitter.im/ChristianTremblay/BAC0?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "BAC0"
version = "2024.09.17"
version = "2024.09.20dev"
description = "BACnet Scripting Framework for testing DDC Controls"
authors = [{name = "Christian Tremblay", email = "[email protected]"}]
readme = "README.md"
Expand Down Expand Up @@ -40,4 +40,4 @@ include = [
namespaces = false

[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "session"
asyncio_default_fixture_loop_scope = "session"

0 comments on commit c9a3145

Please sign in to comment.