Commit graph

592 commits

Author SHA1 Message Date
Ralf Schlatterbeck f61d0b2e1e Use PROCESS_PAUSE macro 2014-06-30 10:25:47 +02:00
Ralf Schlatterbeck 77c02d58f8 Refactor A/D conversion in adc.c
Now the necessary settings are in adc.h. Refactored to allow repeated
ADC reads without reinitialization. Arduino allows setting
analogReference, this is now also implemented.
ADC is now initialized to sane values in apps/arduino/arduino-process.c
dev/arduino/arduino-compat.h now has all hardware independent settings
for arduino (some moved from platform/osd-merkur/dev/hw-arduino.h).
turnOffPWM re-implemented with hw_timer, removed from wiring_digital.c
ADC-specific arduino stuff moved to arduino-compat.h
Arduinos wiring_analog no longer necessary.
arduino-sketch example now reads analog inputs 1 and 5 using analogRead.
2014-06-29 17:26:15 +02:00
Ralf Schlatterbeck 4643c5d02d Factor resources, fix time
Now there is a generic resource that can generate and parse
application/json as well as text/plain. It can be re-used, only the
from_string and to_string routines have to be written and the resource
properly set up. A new resource format is specified, see
GENERIC_RESOURCE in, e.g., examples/osd/pwm-example. This is now used in
all my examples, namely pwm-example, arduino-sketch, wallclock-time.

There was an off by one error for the month in time formatting (in
gmtime and localtime). And the leap-year computation was broken. Both
fixed now, so we get a correct date. For localtime we are still 2 hours
off because daylight saving isn't implemented yet.

Also renamed gmtime to utc.
2014-06-27 22:25:51 +02:00
Ralf Schlatterbeck 9df7ab3875 Fix leap year computation 2014-06-27 22:10:19 +02:00
Ralf Schlatterbeck f0f5391409 Make Arduino timer stuff work on Contiki
New discovery: Contiki also uses timer 0. With almost the same interface
as Arduino. So we now completely get rid of wiring.c (only the main
file, the other wiring_xxx stay) and implement Arduino timer, delay, etc
in terms of the corresponding Contiki routines. Verified that now delay
works as expected. The LED in examples/osd/arduino-sketch blinks!

Before this, the arduino_init routine in wiring.c destroyed the timer-0
initialization of contiki, making both, contiki timer implementation
*and* contiki timer implementation fail if the arduino_init routine was
called. Now both work.
2014-06-26 18:37:13 +02:00
Ralf Schlatterbeck e65dabb119 Add Arduino compatibility layer
We can now directly compile arduino sketches (.pde) files.
Arduino compatible analogWrite works now.
But there is still a long way to go, serial I/O and timer stuff (delay,
millis etc) currently don't work (not tested but I don't expect this to
work).
It can be used in an arduino sketch or in a normal contiki program.
We get a PWM frequency of 490.2 Hz (a period of 2.040 ms), that's
Arduino compatible. If you need different frequencies see native timer
usage in examples/osd/pwm-example
In a contiki program you have to call arduino_pwm_timer_init to
initialize the timer before pwm works. The arduino sketch wrapper
already does this.
For running a sketch, see examples/osd/arduino-sketch
2014-06-26 11:00:01 +02:00
Ralf Schlatterbeck f48566d51f Add wallclock time handling
New application and new example.
We use the built-in timer routines and add an offset to get the
wallclock time. The offset can be set by time-changing routines
(currently only settimeofday).
We also maintain an offset for timezone handling but this isn't
currently fully implemented.
2014-05-29 17:31:19 +02:00
Nelson Kigen 5edd6bc75b New MACRO for creating jsontree_array
This proposed MACRO simplifies jsontree_array declarations. It takes as arguments the name of the array and its size. ( I've modified the indention as requested )
2014-02-26 19:38:10 +01:00
Oliver Schmidt e16521e5c1 Merge pull request #550 from oliverschmidt/master
Avoid compiler warnings.
2014-01-31 16:22:53 -08:00
Oliver Schmidt a94e7e63e2 Avoid compiler warnings. 2014-02-01 00:46:57 +01:00
Adam Dunkels 45265249fc Changed the name of the rimeaddr module to linkaddr 2014-01-29 20:12:24 +01:00
Adam Dunkels b244f30480 Moved the ctk files from core/lib into core/lib/ and core/lib/libconio 2014-01-26 23:20:46 +01:00
Adam Dunkels 8eace27f9b Moved net/rime.h to net/rime/rime.h 2014-01-26 23:20:45 +01:00
Adam Dunkels 0fe08205e1 Moved the rimeaddr.[ch] code from the core/net/rime module to the core/net module, as it is used not only by rime code 2014-01-26 23:20:36 +01:00
Adam Dunkels 4cfe6c4a5e Moved the sht11 driver to its own module 2014-01-26 23:20:30 +01:00
Adam Dunkels 0b805e4763 Moved the cc2420 driver into a separate dev/cc2420 module 2014-01-26 23:20:27 +01:00
Adam Dunkels 5f3fe7f7c7 Updated include paths for the moved files under net/ 2014-01-26 23:20:23 +01:00
Oliver Schmidt 1f4613383f Added more flexibility to webbrowser -> wget forwarding.
- Up to now the CTK program handler was necessary to start wget and forward the URL. Now alternatively the webbrowser uses the underlying OS to exec wget.

- Up to now windowed CTK was necessary to display the acknowledge dialog. Now alternatively the webbrowser displays the acknowledge text and buttons right in the webpage area.

- For now the targets 'win32' and 'c64' make use of the new capabilities.
2014-01-24 16:09:30 +01:00
Adam Dunkels ae5a3f9f67 Bumped the version number from 2.6 to 3.x, which is to be used in the development branch 2013-12-12 17:33:18 +01:00
Nicolas Tsiftes 65392ce59e Merge pull request #474 from adamdunkels/push/cleanup-vnc
Remove the VNC client and server
2013-11-29 05:07:53 -08:00
Adam Dunkels 611c659e51 Removed the VNC/CTK server and the VNC viewer app 2013-11-28 14:10:47 +01:00
Adam Dunkels 0fd503af42 Removed the experimental checkpointing code 2013-11-28 14:09:17 +01:00
Adam Dunkels bb2dcaa057 A massive all-tree automated update of all double inclusion guard #defines that changes from using two underscores as a prefix, which are reserved, to not using two underscores as a prefix 2013-11-24 20:20:11 +01:00
Oliver Schmidt 2316c6b461 Reverted commit below as the cc65 bug in question is fixed.
Rearranged some expressions to avoid triggering a cc65 bug. (reverse-merged from commit 7134da0915)
2013-10-08 22:42:41 +02:00
Oliver Schmidt 7134da0915 Rearranged some expressions to avoid triggering a cc65 bug. 2013-10-05 21:26:28 +02:00
Simon Duquennoy 248301a041 Fix naming issues and includes in uip-ds6-nbr.h 2013-08-19 17:48:30 +02:00
Simon Duquennoy 5dc05e7913 Port apps, examples, platforms and tools so they use the new neighbor and route API. 2013-08-19 17:48:30 +02:00
Nicolas Tsiftes b27fb1b697 Prevent erroneous index creation for non-numerical attributes. 2013-08-07 10:50:30 +02:00
Oliver Schmidt 3f2fd36d8a Merge pull request #310 from oliverschmidt/master
Minor code style fix
2013-07-30 13:51:52 -07:00
Oliver Schmidt 49fb300aa0 Minor code style fix 2013-07-30 22:48:04 +02:00
Daniele Alessandrelli 9230c0a158 Fix for coap_get_header_token() always returning 0 and not retrieving the token when using CoAP draft v13.
Every reference to the old Token Option has been removed (in CoAP draft v13 the Token Option has been promoted to a field following the CoAP Header).
2013-07-22 19:36:01 +02:00
Nicolas Tsiftes f606322ae0 Merge pull request #276 from mkovatsc/er-coap-13
Erbium (Er) fixes and updates
2013-06-24 01:44:23 -07:00
Matthias Kovatsch a8653f1a70 Fixed stimer issues due to core changes for older Erbium versions. 2013-06-19 15:59:45 +02:00
Matthias Kovatsch 75b958bb03 Added CoAP ping support. 2013-06-19 15:27:23 +02:00
Matthias Kovatsch 5e18efa10c Updated copyright information. 2013-06-19 15:27:20 +02:00
Matthias Kovatsch 78e3a75b9c Updated buffer definition macro due to core changes. 2013-06-19 15:27:04 +02:00
Matthias Kovatsch 3048126ff1 Limited observe clock to 24 bits. 2013-06-19 14:45:57 +02:00
Matthias Kovatsch 56f877b633 Fixed option header bug for large deltas. 2013-06-19 14:45:20 +02:00
Adam Dunkels 0b882cd516 Telnetd improvement: allow specifying a maximum silence time and kill the connection after that time. This is to avoid the telnet connection getting stuck forever if the connecting host reboots. 2013-05-25 12:10:26 +02:00
Karl Palsson 2146ee1c84 [webserver] Update urls in default data
Replace all links to sics.se with contiki.org
2013-05-21 21:19:32 +00:00
Mariano Alvira 5df586e09d Merge pull request #184 from g-oikonomou/bug-fixes/rimestats
Rimestats Fix (#183)
2013-05-19 07:45:22 -07:00
Mariano Alvira e24a50c1b2 Remove everything that depended on the now gone twitter APP. 2013-05-18 18:22:37 -04:00
Adam Dunkels 59a8df14a8 Merge pull request #189 from sieben/markdown
Update to markdown
2013-05-16 00:24:25 -07:00
Karl Palsson 7345579ad6 Replace twitter app with generic http-post-auth
Twitter removed http basic auth from the api in august 2010, but this
underlying code is a good example of doing http basic auth in contiki.

The app has been renamed, and some fixes applied to make it build
cleanly.
2013-05-04 12:17:18 +00:00
François Revol b9774989a1 Add missing include
Fix log_message() undefined warning.
2013-04-20 14:43:37 +02:00
Rémy Léone e6bd4f1dde Rename to md 2013-03-26 23:15:37 +01:00
Rémy Léone 7b40a568a6 Update to markdown
- Spellchecking
- Update plain text to github markdown
2013-03-26 16:55:19 +01:00
George Oikonomou a82746e72a Fix a mismatch between declaration and definition 2013-03-23 15:07:47 +00:00
George Oikonomou db078cf7e8 Replace reads of rimestats with RIMESTATS_GET(x) 2013-03-20 21:14:35 +00:00
George Oikonomou 8c0cf50dca Rename RIMESTATS_CONF_ON to RIMESTATS_CONF_ENABLED 2013-03-20 21:14:34 +00:00