Giter Site home page Giter Site logo

macherdaachbadgequeue's Introduction

MacherdaachBadgeQueue

This repo houses the Lötplatz-Zuweisungssystem for the Macherdaach 2021 in Landau, hosted by ZTL.

Getting started ...

... with PyCharm

  1. Checkout the repo via git clone
  2. Get the MQTT-config file to access the mqtt broker
    1. Contact: Casartar or JohnnyMoonlight
  3. Initialize with your favourite IDE
    1. Sample configuration for PyCharm: img.png
    2. ...

... on your favourite command line

This project is self-contained. You should have no trouble executing the application from the directory 'Software'

python main.py

Sample MQTT Messages

Topics

topic_from_place = "macherdaach/queue/messageFromPlace"

topic_from_controller = "macherdaach/queue/messageFromController"

New user has arrived at place one and starts soldering

{
  "place_number": 1,
  "place_occupied": true
}

User has finished soldering

{
  "place_number": 1,
  "place_occupied": false
}

Place new ticket number in queue

{
  "new_number":1
}

Properties to access view

These properties in the package view are responsible for displaying information in the gui.

macherdaachbadgequeue's People

Contributors

casartar avatar cboltz avatar exellent1988 avatar johnnymoonlight avatar t-hellmund avatar

Watchers

 avatar  avatar

macherdaachbadgequeue's Issues

Enhancement of class Place

Vermutlich noch ergänzen mit:


class Place:
    def __init__(self, state=PlaceState.FREE, ticket_number=0, start_time=None):
        self.state = state
        self.ticket_number = ticket_number  # registered ticket number
        self.start_time = start_time
    def clearPlace():
        self.state = PlaceState.FREE
        self.ticket_number = 0
    def occupyPlace(ticketNumber):
        #Todo: occupy only possible, when place has status registered and user has same ticket number as reservation
        self.state = PlaceState.OCCUPIED
    def registerTicket (ticketNumber):
        if (self.state != PlaceState.FREE):
            self.state = PlaceState.REGISTERED
            self.ticket_number = ticketNumber
        else:
            raise RegistrationError('Can only register to free place')

Unclear if check in controller.py

controller.py contains the following check:

                if placeInList == self.model.list_of_places[-1]:
                    # Found no vacant place - put number in queue
                    print("New number " + str(new_number))
                    self.model.list_of_ticket_numbers.append(new_number)

Its function is not clear to me - please give me a quick heads up about its usefulness.

Set up depencies in environment-agnostic way

Is there a way to make sure, that anyone with a pyton distribution can start this application?

At the moment, the depency "paho" is shipped within the the folder "libs". I accept the fact, that this is not the best way, since updates need to be applied manually.

The pro-argument for this approach is having no unnecessary environment-variable setup for the dependencies and ensuring simple application start ups form the command line. This can propably be optimized.

Testcases required

We need a list of use-cases, such as:

  1. Add new ticket number to queue
  2. User starts working at place, releases place.
  3. etc

Reason: make sure app works as expected, after changes (a subsequent task then would be creating tests)

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.