Skip to content

Template for the String datatype for Particle Variable was not being used #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions cores/oak/OakParticle/OakParticle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@ using namespace particle_core;
CloudClass::CloudClass(){
spark_initConfig(false);
}
template<typename T>
bool CloudClass::variable(const T *varKey, const String *userVar, const CloudVariableTypeString& userVarType)
{
spark_variable_t extra;
extra.size = sizeof(extra);
extra.update = update_string_variable;
return CLOUD_FN(spark_variable(varKey, userVar, CloudVariableTypeString::value(), &extra), false);
}

bool CloudClass::function(const char *funcKey, user_function_int_str_t* func)
{
Expand Down
8 changes: 7 additions & 1 deletion cores/oak/OakParticle/OakParticle.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,13 @@ class CloudClass : public Stream {
}

template<typename T>
static bool variable(const T *varKey, const String *userVar, const particle_core::CloudVariableTypeString& userVarType);
static inline bool variable(const T *varKey, const String *userVar, const particle_core::CloudVariableTypeString& userVarType)
{
particle_core::spark_variable_t extra;
extra.size = sizeof(extra);
extra.update = update_string_variable;
return CLOUD_FN(spark_variable(varKey, userVar, particle_core::CloudVariableTypeString::value(), &extra), false);
}

template<typename T>
static inline bool variable(const T *varKey, const String &userVar, const particle_core::CloudVariableTypeString& userVarType)
Expand Down