Giter Club home page Giter Club logo

Comments (8)

rnixx avatar rnixx commented on August 17, 2024

I'd say

midpoint = round((low + high) / 2)

@sde1000 ?

from python-dali.

fabltd avatar fabltd commented on August 17, 2024

Hi

Its a python 3 issue:

In Python 3, / is float division

In Python 2, / is integer division (assuming int inputs)

In both 2 and 3, // is integer division

from python-dali.

sde1000 avatar sde1000 commented on August 17, 2024

...and you can get the python 3 behaviour in python 2 using from __future__ import division

python-dali doesn't support python 3 at the moment. I will be fixing this before the end of November because I need python 3 support myself!

from python-dali.

fabltd avatar fabltd commented on August 17, 2024

@sde1000

Thanks. I have been modifying the code to run with Python 3 and an RS232 interface.

Do you expect the find ballast process to be quite slow?

from python-dali.

sde1000 avatar sde1000 commented on August 17, 2024

Depending on the number of ballasts, yes it is slow.

from python-dali.

dgomes avatar dgomes commented on August 17, 2024

Using python3 (trying to integrate DALI into home-assistant.io) and except for this all works in python3

from python-dali.

sde1000 avatar sde1000 commented on August 17, 2024

Commit 27f8909 which I've just pushed may help with this.

If it doesn't, can you let me know how it's failing? I don't have a test environment set up at the moment; I need to buy another DALI interface...

from python-dali.

dgomes avatar dgomes commented on August 17, 2024

well I fixed it myself in the example code :) didn't notice there were more about it in the code.

Thanks for all your work!

from python-dali.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.