function 1 "smke";
function 2 "tlx";
function 3 "sfx";
- //function 5 "whst";
+ function 5 "whst";
};
locomotive 33961
#include "constants.h"
#include "control.h"
#include "locomotive.h"
+#include "locotype.h"
#include "reply.h"
using namespace std;
data[3] |= (1<<i);
}
control.command(CMD_LOK, data, 4);
+
+ if(setf && type.get_max_function()>4)
+ {
+ if(!++data[0])
+ ++data[1];
+ data[2] = 0;
+ data[3] = 0xA0;
+ for(unsigned i=0; i<4; ++i)
+ if((funcs>>i)&32)
+ data[3] |= (1<<i);
+ control.command(CMD_LOK, data, 4);
+ }
}
void Locomotive::status_reply(const Reply &reply)
art_nr(an)
{ }
+unsigned LocoType::get_max_function() const
+{
+ if(funcs.empty())
+ return 0;
+ return (--funcs.end())->first;
+}
+
LocoType::Loader::Loader(LocoType <):
Msp::DataFile::BasicLoader<LocoType>(lt)
LocoType(unsigned);
unsigned get_article_number() const { return art_nr; }
const std::string &get_name() const { return name; }
+ unsigned get_max_function() const;
const std::map<unsigned, std::string> &get_functions() const { return funcs; }
};