Skip to content
Snippets Groups Projects
Commit 8bd5cd04 authored by james.goppert's avatar james.goppert
Browse files

Fixed EEProm for new vector style.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1252 f9c3cf11-9bcb-44bc-f272-b75c42450872
parent 0a4bc9b1
No related branches found
No related tags found
No related merge requests found
/*
* AP_EEProm.h
* AP_EEProm.cpp
* Copyright (C) James Goppert 2010 <james.goppert@gmail.com>
*
* This file is free software: you can redistribute it and/or modify it
......
......@@ -85,7 +85,7 @@ protected:
/**
* The main EEProm Registry class.
*/
class AP_EEPromRegistry : public AP_Vector<AP_EEPromEntry *>
class AP_EEPromRegistry : public Vector<AP_EEPromEntry *>
{
public:
......
......@@ -38,15 +38,15 @@ void loop()
Serial.printf_P(PSTR("\nvar.getId(): %d\n"), id);
delay(2000);
Serial.printf_P(PSTR("\neepromRegistry(id)->getEntry(): %f\n"), eepromRegistry(id)->getEntry());
Serial.printf_P(PSTR("\neepromRegistry(id)->getEntry(): %f\n"), eepromRegistry[id]->getEntry());
delay(2000);
eepromRegistry(id)->setEntry(456);
eepromRegistry[id]->setEntry(456);
Serial.printf_P(PSTR("\neepromRegistry(id)->setEntry(456): %d\n"), var.get());
delay(2000);
Serial.printf_P(PSTR("\nprint the parameters name by id: %s\n"), eepromRegistry(id)->getName());
Serial.printf_P(PSTR("\nprint the parameters address by id: %d\n"), int(eepromRegistry(id)->getAddress()));
Serial.printf_P(PSTR("\nprint the parameters name by id: %s\n"), eepromRegistry[id]->getName());
Serial.printf_P(PSTR("\nprint the parameters address by id: %d\n"), int(eepromRegistry[id]->getAddress()));
Serial.print("\n\nSynced variable demo\n");
......@@ -69,15 +69,15 @@ void loop()
Serial.printf_P(PSTR("\nvar2.getId(): %d\n"), id);
delay(2000);
Serial.printf_P(PSTR("\neepromRegistry(id)->getEntry(): %f\n"), eepromRegistry(id)->getEntry());
Serial.printf_P(PSTR("\neepromRegistry(id)->getEntry(): %f\n"), eepromRegistry[id]->getEntry());
delay(2000);
eepromRegistry(id)->setEntry(4.56);
eepromRegistry[id]->setEntry(4.56);
Serial.printf_P(PSTR("\neepromRegistry(id)->setEntry(4.56): %f\n"), var2.get());
delay(2000);
Serial.printf_P(PSTR("\nprint the parameters name by id: %s\n"), eepromRegistry(id)->getName());
Serial.printf_P(PSTR("\nprint the parameters address by id: %d\n"), int(eepromRegistry(id)->getAddress()));
Serial.printf_P(PSTR("\nprint the parameters name by id: %s\n"), eepromRegistry[id]->getName());
Serial.printf_P(PSTR("\nprint the parameters address by id: %d\n"), int(eepromRegistry[id]->getAddress()));
delay(5000);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment