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
/* | |
* Operation of Asynchronous FAT: | |
* | |
* All calls return immediately. We NEVER busyloop, waiting for data | |
* | |
* Whenever new data is required, we request a DMA transfer and return | |
* | |
* We maintain a queue of tasks. External tasks (eg open, read, readdir) are | |
* placed at the bottom of the queue. | |
* Internal tasks (eg traverse FAT, read directory, etc) are placed at the |
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
PROJECT = silken | |
FLAGS=-Wall -ffunction-sections -fdata-sections -g | |
CFLAGS=$(FLAGS) -std=gnu99 -g | |
CXXFLAGS=$(FLAGS) -std=gnu++0x | |
LDFLAGS=$(FLAGS) -Wl,-gc-sections | |
CC=gcc | |
CPP=g++ |
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
// g++ -g -DMEMDEBUG -o test test.cpp MemoryPool.cpp && ./test | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include "MemoryPool.h" | |
class T1 { | |
public: | |
T1(){ |
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
#include "RostockSolution.h" | |
#include <math.h> | |
#define X_AXIS 0 | |
#define Y_AXIS 1 | |
#define Z_AXIS 2 | |
RostockSolution::RostockSolution(Config* passed_config) : config(passed_config){ | |
alpha_steps_per_mm = passed_config->value(alpha_steps_per_mm_checksum)->by_default(80)->as_number(); | |
beta_steps_per_mm = passed_config->value( beta_steps_per_mm_checksum)->by_default(80)->as_number(); |
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
/** Intended design pattern: */ | |
class ModulePool : public Module { | |
std::map<const char*,Module*> children; // list of name->Module pairs which are children of this ModulePool | |
}; | |
class ConfigKey { | |
public: | |
ConfigKey(); // empty key, use for retrieving config settings | |
ConfigKey(const char* line); // extract key and value from the provided line |
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
diff --git a/src/modules/robot/Robot.cpp b/src/modules/robot/Robot.cpp | |
index 3dcb7bb..c4bf877 100644 | |
--- a/src/modules/robot/Robot.cpp | |
+++ b/src/modules/robot/Robot.cpp | |
@@ -112,10 +112,7 @@ void Robot::execute_gcode(Gcode* gcode){ | |
case 91: this->absolute_mode = false; break; | |
case 92: { | |
if(gcode->get_num_args() == 0){ | |
- for (char letter = 'X'; letter <= 'Z'; letter++){ | |
- if ( gcode->has_letter(letter) ) |
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
/* | |
* intended design pattern: | |
* | |
* void YourModule::on_config_value(void *argument) | |
* { | |
* ConfigValue* value = staticcast<ConfigValue*>(argument); | |
* if (value->is_for_me(my_string)) | |
* { | |
* if (value->is_for_my_submodule()) | |
* { |
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
M105 | |
T:28.0 /200.0 B:-58.0 /0.0 | |
ok | |
config-set alpha_current 1.25 | |
config-get alpha_current | |
M105 | |
live: alpha_curtconfig-get has been set to alpha_currM105 | |
M105 | |
T:28.0 /200.0 B:-58.0 /0.0 | |
ok |
This file has been truncated, but you can view the full file.
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
$ lsusb | |
Bus 001 Device 023: ID 1679:2001 Total Phase Beagle USB 12 Protocol Analyzer | |
Bus 002 Device 004: ID 0930:0508 Toshiba Corp. Integrated Bluetooth HCI | |
Bus 002 Device 003: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader | |
Bus 003 Device 046: ID 1d50:6015 OpenMoko, Inc. | |
Bus 003 Device 122: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC | |
Bus 004 Device 030: ID 046d:c404 Logitech, Inc. TrackMan Wheel | |
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub | |
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub | |
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub |