This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* `direction` może przyjąc jeden z poniższych wartości: | |
* l = (left) | |
* r = (right) | |
* f = (forward) | |
* b = (back) | |
* bl = (back/left) rb = (back/right) | |
* fl = (front/left) fr = (front/right) | |
*/ | |
this.flip = function(direction) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Importujemy bibliotekę dgram dzięki której możemy użyć protokołu UDP | |
var dgram = require('dgram'); | |
// Tworzymy "klasę" Tello, którą potem będziemy używać do sterowania dronem, | |
var Tello = function() { | |
// Definiujemy kilka stałych | |
// @see https://dl-cdn.ryzerobotics.com/downloads/tello/0228/Tello+SDK+Readme.pdf | |
// Domyślny port drona. | |
var PORT = 8889; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SomeClass { | |
@observable prop1; | |
@observable prop2; | |
@action init(prop1, prop2) { | |
this.setProp1(prop1); // or this.prop1 = prop1; ? | |
this.setProp2(prop2); // or this.prop2 = prop2; ? | |
} | |
@action |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MenuLink.js | |
import React from 'react'; | |
import { Link } from 'react-router'; | |
export default class MenuLink extends React.Component { | |
render() { | |
return <Link {...this.props} />; | |
} | |
} | |
// --- |