Skip to content

Instantly share code, notes, and snippets.

/**
* Open inspector UI. tree, style and DOM panels if enabled. Add listeners for
* document scrolling, resize and tabContainer.TabSelect.
*/
openInspectorUI: function IUI_openInspectorUI()
{
// initialization
if (!this.domplate) {
Cu.import("resource:///modules/domplate.jsm", this);
let dom = Cu.getGlobalForObject(Node);
%
O40390(AT3 10-TEETH PULLEY-ROTARY TABLE)
(PULLEY FOR ROBOTIC TEAM)
(CREATED 09/26/2019)
(STARTED )(12/03/19)(11:55AM)
(FINISHED)(12/04/19)(01:05PM)
(CYCLE TIME)(20 MIN)
( X ZERO SET AT THE FIXTURE FACE )
(Z=-0.925 AT THE LEFT FACE OF THE PART)

Running 6 udrive motors with master board at differnet communication frequencies

Date: Thursday, 28 Nov 2019 Author: Julian Viereck

This is running the example.cpp from the master-board with 6 udrive boards. With the stock firmware configuration, we were not able to achieve a stable communication loop. When switching to 2 retries and lower the SPI communication bus speed from 8 to 6 kHz, a stable (zero error) communication was established.

The exact code (modifications to the firmware and the example.cpp) are on this branch.

With retry 2, 8 kHz communication

Rust Borrow Rules Overview

NOTE: The rules shown here do not take the lifetime constraints into account. The rules could be easily adapted to cover the lifetimes as well but this is not done for similicty at this point.

How to read the following:

The operations on the objects and fiels are denoted as follows:

// Based on example from: https://doc.rust-lang.org/book/drop.html
struct HasDrop<'a> {
id: isize,
next: Option<&'a mut HasDrop<'a>>
}
// Implementing the |Drop| trait causes the errors shown below.
impl<'a> Drop for HasDrop<'a> {
fn drop(&mut self) {
var state = 0;
while(true) {
switch(state) {
case 0: // init
...
case 1:
state = 0; // <--- this could be optimized to a direct jmp to the `case 0`.
break;
}
}

On editing "files"

(or: Editing pieces of files that are of interest to devolpers compared to editing entire files.)

At the moment I enjoy the fun of writing software most of my day as it is my real work. I can play with different tools, editors and a lot of other cool stuff. At some point I was wondering about how the software writing cycle looks like and could be improved. Mostly, how can editing many files be improved.

Let's step back for a moment. Assuming you are working in a team, a common workflow might look like this:

  • a distributed version control system is used (e.g. git)
  • there is one main branch developers commit their polished changes to
function match(str)
{
//----------------------------------------------------------------
// Genereated by RegExp.JS
//
// Input=/^abc/
//----------------------------------------------------------------
var state = 0;
var charCode = 0;
var len=str.length;
//----------------------------------------------------------------
// Genereated by RegExp.JS
//
// Input=/^abc/
//----------------------------------------------------------------
var state = 0;
var charCode = 0;
var len=str.length;
var idx=-1;
#navigator-toolbox {
margin-top: -2px;
}
#tabbrowser-tabs {
margin-left: -5px;
}
#nav-bar-customizationtarget {
margin-top: -3px;