forked from compAIR/libcreate
Implemented Create reset method
This commit is contained in:
parent
d3a714cc51
commit
aaa7b5076e
3 changed files with 15 additions and 1 deletions
|
@ -84,7 +84,7 @@ endforeach()
|
||||||
# Configuration #
|
# Configuration #
|
||||||
#################
|
#################
|
||||||
|
|
||||||
set(CMAKE_INSTALL_PREFIX "/usr/")
|
# set(CMAKE_INSTALL_PREFIX "/usr/") // complib needs this, riplib doesn't
|
||||||
|
|
||||||
# Install directories layout:
|
# Install directories layout:
|
||||||
# * <prefix>/lib/
|
# * <prefix>/lib/
|
||||||
|
|
|
@ -135,6 +135,11 @@ namespace create {
|
||||||
*/
|
*/
|
||||||
~Create();
|
~Create();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Resets the create as if the battery was removed and reinserted.
|
||||||
|
*/
|
||||||
|
void reset();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Make a serial connection to Create.
|
* \brief Make a serial connection to Create.
|
||||||
*
|
*
|
||||||
|
|
|
@ -67,6 +67,15 @@ namespace create {
|
||||||
disconnect();
|
disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Create::reset() {
|
||||||
|
if (!connected()) {
|
||||||
|
CERR("[create::Serial] ", "send failed, not connected.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
serial->sendOpcode(OC_START);
|
||||||
|
serial->sendOpcode(OC_RESET);
|
||||||
|
}
|
||||||
|
|
||||||
Create::Matrix Create::addMatrices(const Matrix &A, const Matrix &B) const {
|
Create::Matrix Create::addMatrices(const Matrix &A, const Matrix &B) const {
|
||||||
size_t rows = A.size1();
|
size_t rows = A.size1();
|
||||||
size_t cols = A.size2();
|
size_t cols = A.size2();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue