Skip to content

Commit

Permalink
fix small things
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickwieth committed Oct 1, 2021
1 parent f1315e3 commit fc177c0
Show file tree
Hide file tree
Showing 20 changed files with 540 additions and 112 deletions.
11 changes: 9 additions & 2 deletions Heater.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ function setPower(value){
}

function turnOn() {
if(!heaterOn) pressOnOff();
if(!heaterOn) {
pressOnOff();
heatButton();
}
}

function turnOff() {
Expand Down Expand Up @@ -87,6 +90,10 @@ function onOff() {
relay.flop(1);
}

function heatButton() {
relay.flop(2);
}

function powerUp() {
relay.flop(3);
}
Expand All @@ -103,4 +110,4 @@ function powerDown() {
Es gibt folgende Leistungswerte in Watt:
300, 600, 800, 1000, 1200, 1300, 1500, 1600, 1800, 2000
*/
*/
4 changes: 2 additions & 2 deletions PID.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exports.setTarget = setTarget;
exports.getCorrection = getCorrection;

// parameters are k_P, k_I and k_D, where P is proportional, I integral and D differential
var ctr = new Controller(0.15, 0.01, 0.08);
var ctr = new Controller(0.20, 0.00, 2.5); // integral was 0.01, is now disabled
var correction = -1;

function feed(data) {
Expand All @@ -22,4 +22,4 @@ function setTarget(value) {

function getCorrection() {
return correction;
}
}
2 changes: 1 addition & 1 deletion QuadRelay.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var Tinkerforge = require('tinkerforge');
var HOST = 'localhost';
var PORT = 4223;
var UID = 'mUn';
var delay = 600; // relay delay in ms
var delay = 1000; // relay delay in ms

var ipcon = new Tinkerforge.IPConnection(); // Create IP connection
var iqr = new Tinkerforge.BrickletIndustrialQuadRelay(UID, ipcon); // Create device object
Expand Down
2 changes: 1 addition & 1 deletion angular/app/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
"jquery-flot":"0.x",
"angular":"1.2.x",
"angular-route":"~1.2.x",
"angular-flot":"0.0.1"
"angular-flot":"0.0.x"
}
}
10 changes: 5 additions & 5 deletions angular/app/bower_components/angular-flot/.bower.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"name": "angular-flot",
"main": "angular-flot.js",
"version": "0.0.1",
"version": "0.0.17",
"authors": [
"Lorenzo Villani <[email protected]>"
],
"description": "An Angular directive to wrap Flotcharts.",
"license": "MIT",
"homepage": "http://github.com/develersrl/angular-flot",
"_release": "0.0.1",
"_release": "0.0.17",
"_resolution": {
"type": "version",
"tag": "v0.0.1",
"commit": "de31ffa9d787c887da8a35cdcbc6dd3189d1a447"
"tag": "v0.0.17",
"commit": "93d0e5e532c85948a9913b1bba17cafa1d8d258f"
},
"_source": "https://github.com/develersrl/angular-flot.git",
"_target": "0.0.1",
"_target": "0.0.x",
"_originalSource": "angular-flot"
}
56 changes: 56 additions & 0 deletions angular/app/bower_components/angular-flot/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Change Log

All notable changes to this project are documented in this file.

## 0.0.17 - 2017-04-19

### Added

* Minified version of `angular-flot.js`.


## 0.0.16 - 2016-01-10

* No functional changes. Bumped copyright year and added license header to angular-flot.js.


## 0.0.15 - 2015-11-24

* Use `$timeout` instead of `scope.$apply` in event handlers. See also issue #30.


## 0.0.13 - 2015-09-17

* Properly destroy the plot when the directive is being destroyed. Contributed by @Botffy.


## 0.0.11 - 2015-09-12

* Watch width and height attributes. Contributed by @gudubeth.


## 0.0.10 - 2015-07-23

* Prevent double initialization when both a dataset and plot options are given. Thanks to @liuce for
the patch.


## 0.0.9 - 2015-06-30

* Switch to semistandard-format (that performs semicolon insertion) to reformat source code since
the lack of semicolon broke some builds.


## 0.0.8 - 2015-06-29

* Added pie chart example.
* Added categories chart example.
* Removed development dependency on CoffeeScript. Use plain old ES5.
* Forward "plotclick" and "plothover" events to controller (thanks to Itsiki Avidan) [#21, #22].


## 0.0.6 - 2014-09-18

### Changed

* __BREAKING CHANGE__: Initial watch is done with scope.$watch instead of scope.$watchCollection.
49 changes: 49 additions & 0 deletions angular/app/bower_components/angular-flot/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Contributing

We accept contributions of every kind: documentation, code, artwork. Any help is greatly
appreciated. This document contains everything needed to get started with your first contribution.


## Contributing Code

We keep the source code on [GitHub](https://www.github.com/) and take contributions through
[GitHub pull requests](https://help.github.com/articles/using-pull-requests).

For smaller patches and bug fixes just go ahead and either report an issue or submit a pull
request.

It is usually a good idea to discuss major changes with the developers, this will help us
determine whether the contribution would be a good fit for the project and if it is likely to be
accepted. There's nothing worse than seeing your hard work being rejected because it falls outside
of the scope of the project.

Make sure your editor respects the [EditorConfig](http://editorconfig.org/) configuration file we
put at the root of the repository.

We follow [GitHub Flow](http://scottchacon.com/2011/08/31/github-flow.html) as our git workflow of
choice which boils down to:

* The `master` branch is always stable and deployable.
* To work on something new, branch off `master` and give the new branch a descriptive name (e.g.:
`sort-packages-by-name`, `issue-32`, etc).
* Regularly __rebase__ that branch against `master` and push your work to a branch with the same
name on the server.
* When you need feedback, help or think you are ready,
[submit a pull request](https://help.github.com/articles/using-pull-requests).
* Once the branch has been merged (or rebased) into `master`, delete it from both your local and
remote repository.

We invite you to follow
[these guidelines](http://who-t.blogspot.de/2009/12/on-commit-messages.html) to write useful
commit messages.

Additionally, you don't need to add entries to the [CHANGELOG.md](CHANGELOG.md) file, this is our
responsibility.


## Reading List

* [GitHub Flow](http://scottchacon.com/2011/08/31/github-flow.html)
* [Keep a Changelog](http://keepachangelog.com/)
* [On Commit Messages](http://who-t.blogspot.de/2009/12/on-commit-messages.html)
* [Semantic Versioning](http://semver.org/)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014 Develer S.r.L.
Copyright (c) 2016 Develer S.r.L.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
46 changes: 37 additions & 9 deletions angular/app/bower_components/angular-flot/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
angular-flot
============
# angular-flot

An Angular directive which wraps [Flotcharts](http://www.flotcharts.org/).
<img src="https://rawgit.com/develersrl/angular-flot/master/logo.svg" align="right" width="200" height="200"/>

[![Bower](https://img.shields.io/bower/v/angular-flot.svg?style=flat)](https://github.com/develersrl/angular-flot)
[![npm](https://img.shields.io/npm/v/angular-flot.svg?style=flat)](https://www.npmjs.com/package/angular-flot)
[![License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](http://choosealicense.com/licenses/mit/)

# Installation
An Angular directive that wraps [Flotcharts](http://www.flotcharts.org/).


## Installation

This library is provided as a Bower component and NPM module:

- Bower: `bower install angular-flot`
- NPM: `npm install angular-flot`


# How to Use
## How to Use

First, make sure to add Flotchart to your project, as explained in [Flotchart's
ReadMe](https://github.com/flot/flot/blob/master/README.md) since we don't bundle Flotcharts for
you.
First, make sure to add Flotchart to your project, as explained in
[Flotchart's ReadMe](https://github.com/flot/flot/blob/master/README.md) since we don't bundle
Flotcharts for you.

Add `angular-beacon` to the list of dependencies in your Angular.JS application:
Add `angular-flot` to the list of dependencies in your Angular.JS application:

```javascript
angular.module('myapp', [
Expand All @@ -43,3 +48,26 @@ In your view or template, add the `flot` directive, making sure to specify both
```html
<flot dataset="myData" options="myChartOptions"></flot>
```

The Flot chart is created in a `div` element as a child of the `flot` directive. To select the DOM
element using jQuery, just do as follows (you might have to adjust the example based on the contents
of your page):

```javascript
$('flot > div');
```

## Reference

Directive attributes:

* `dataset`: Name of a variable defined in the current $scope to be used as input dataset. See
<https://github.com/flot/flot/blob/master/API.md#data-format> for more information.
* `options`: Name of an object defined in the current scope used to configure the chart. See
<https://github.com/flot/flot/blob/master/API.md#plot-options> for more information.
* `on-plot-click`: callback function for the 'plotclick' event.
* `on-plot-hover`: callback function for the 'plothover' event.
* `on-plot-selected`: callback function for the 'plotselected' event.
* `width`: Chart width, e.g.: "100%" or "350px".
* `height`: Chart height, e.g.: "100%" or "100px".
* `callback`: callback function with flot object.
48 changes: 0 additions & 48 deletions angular/app/bower_components/angular-flot/angular-flot.coffee

This file was deleted.

Loading

0 comments on commit fc177c0

Please sign in to comment.